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

Prevent throwing on session creation due to stepdown before stepdown completes

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Sharding
    • 39

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: