Improve closing connection behavior when stepping down from primary

XMLWordPrintableJSON

    • Fully Compatible
    • v3.6, v3.4
    • Repl 2017-12-04
    • 19
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There is a race of tagging and closing connections when stepping down. After the connection is established but before it gets tagged, there's a small window where the connection may be closed on stepdown.

      We could fix this by having internal connections tagged in other ways than _isMaster for every incoming connections (maybe logical session?), or only hanging up connections that have locked the database / issued any commands, or not hanging up connections at all but instead just returning a stepdown error.

              Assignee:
              Siyuan Zhou
              Reporter:
              Siyuan Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: