Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5298

Adjust setSoTimeout to apply to aggregate read Time

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown 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?

      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@mongodb.com Ross Lawley
            Reporter:
            slav.babanin@mongodb.com Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: