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

all connections to a server should get closed under certain types of exception

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Ryan reported seeing write exceptions to primary after bouncing both mongod servers.
      I think the reason why you still get an exception from the primary is because we do not clean up all connections upon 1 failure.
      Say you take down primary, 1 write may fail to it and make driver switch to the secondary (new primary).
      All the connections to the old primary are dead but not marked as such.
      When eventually driver switches back to 1st primary, it will use dead connections and that will make some write fail.
      Usually dead connections are cleaned up quickly by reads since they retry 2 times.
      I think we should close all connections to a host in case of certain exceptions (RST) AND a new master is elected, to avoid these errors.
      There is a function in driver that does it but it's not wired in.

            Assignee:
            antoine Antoine Girbal
            Reporter:
            antoine Antoine Girbal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: