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

Return the original error addShard was interrupted with when waiting for majority write

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-03-17
    • 0
    • 2

      The addShard path runs a transaction using the internal txn API. Previously, this txn was run with majority wc, so we'd wait for majority as part of the txn api execution path. If there was a failover when waiting, the txn api would return the stepdown/not primary error the thread was interrupted with. We recently changed the addShard path to run the txn with local wc, and then wait for majority using the waitForMajorityService. If there's a stepdown, the WaitForMajorityService will be killed when its cancellation token is cancelled by the stepdown thread - cancellation tokens are killed with the generic error CallbackCancelled, and the addShard path doesn't overwrite this error with the original error the thread was interrupted with.

            Assignee:
            adam.farkas@mongodb.com Wolfee Farkas
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: