Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57167

Prevent throwing on session creation due to stepdown before stepdown completes

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • 39

      Issue:
      Since SERVER-52564, session checkout throws InterruptedDueToReplStateChange  when a stepdown is in progress. Throwing a retryable error before stepdown is complete means retries may be exhausted (running against the node stepping down) before the new primary steps up and the command can be retargeted. 

      Ideally, the command would be retargeted upon retry.

      Proposal: Instead of bubbling the exception immediately back to the caller, wait for the stepdown to complete before throwing to the top layer. 

      This could be done by catching the initial InterruptedDueToReplStateChange exception thrown, blocking until the RSTL is released in the catch block, then calling checkForInterrupt() and throwing. Thus, by the time the session checkout throws, the stepdown has had time to complete.

            Assignee:
            luis.osta@mongodb.com Luis Osta (Inactive)
            Reporter:
            haley.connelly@mongodb.com Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: