fix(input_messenger) client side retry policy #1680
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Client Ptotocol Rule: Ptotocol in client-side is fixed except
baidu_std
, because ofstreaming_rpc
need create bybaidu_std
ptotocol.But in current implementation, there is a chance that client will accept message but not match with current protocol.
Case:
Client issue two RPC names
A
(usehulu
protocol) andB
(usebaidu_std
protocol) to server in the same connection, If A is sent before B, client will set preferred protocol tobaidu_std
, server will accept these two request and response. Then if response of B received by client before A, B will be parsed success, because it is matched with current protocol(baidu_std
). When parse response of A by current preferred ptotocol(baidu_std
) will fail, according to Client Ptotocol Rule, client think this response isstreaming_rpc
, and try other ptotocols, then response of B will be parsed ok byhulu
ptotocol.That's the point: Shall we just retry
streaming_rpc
when parse failed if current protocol isbaidu_std
? instead of trying all other protocols, or other ptotocol mixed withbaidu_std
will be accepted successfully.