-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: CSOT
-
None
Description: The current implementation of our read operations includes an unnecessary RTT check which is not mandated by the specification. This misalignment may lead to premature timeouts in read operations. The specification details are as follows:
'After wire message construction, drivers MUST check for timeout before writing the message to the server. If the timeout has expired or the amount of time remaining is less than the selected server's minimum RTT, drivers MUST return the connection to the pool and raise a timeout exception.'
However, for reading the response from the server, the specification states:
'After the write is complete, drivers MUST check for timeout expiration before reading the server’s response.'
Proposed Change: Align our implementation with the specification by removing the RTT check from the read operations. We should rely solely on the remaining timeoutMS for determining if a read operation should proceed or timeout.
Additional Consideration: The server is already aware of the maximum allowed execution time by setting maxTimeMS. If we have sent a message to a server, there is a high likelihood that we can either read a timeout error from the server or receive the intended response. Therefore, adjusting our read timeout handling to exclude the RTT check is both safe and more aligned with the specification's intent.