Adjust setSoTimeout to apply to aggregate read Time

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Java Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      The read method in SocketStream sets the socket timeout (setSoTimeout) only once at the beginning, leading to a refresh of the timeout for each new read. 

      Expected Behavior: The aggregate of all reads to receive a server response should be under a single timeout, as per MongoDB's client-side operations timeout specifications.

      Acceptance criteria:

      • Update the read method to reset setSoTimeout with the remaining timeout before each inputStream read call, akin to the implementation in SocksSocket.java

      Performance Impact: To be determined.

            Assignee:
            Ross Lawley
            Reporter:
            Slav Babanin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: