Trane9991 commented on pull request #2181:
URL: https://github.com/apache/thrift/pull/2181#issuecomment-790599343


   @fishy I have a couple of clarification questions about the expected 
behavior of the timeouts. Sorry if I misunderstood something.
   
   1. The logic handles only the retries? What about canceling the reads that 
are taking longer than the deadline?
      For example:
      - If I set a context deadline of 1 second and `i/o timeout` appears, 
before that, a read will be retried. Correct?
      - If the context deadline set to 1 second, but read takes 5 seconds, it 
will not be canceled after 1 second and will not be retried later. Correct?
   2. Is the logic applied only to the `ReadMessageBegin`? What about `Read` 
and `ReadMessageEnd`?
      For example:
       - Context deadline is set to 5 seconds and `i/o timeout` happens after 1 
second of `ReadMessageBegin`, so it will be retried. Right?
       - Context deadline is set to 5 seconds, and `ReadMessageBegin` succeeds 
in 1 second, but the further `Read` fails with the `i/o timeout` in 1 more 
second (so 3 seconds left until the deadline). Will it be retried?
   3. This logic was added to the `TBinaryProtocol`, `TCompactProtocol`, 
`THeaderProtocol` but not to the `TJSONProtocol`, right?
   
   Thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to