Pin a mongos for configureFailPoint when running on multi-router

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • CAR Team 2026-01-19, CAR Team 2026-02-02, CAR Team 2026-02-16
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      jscore tests can run configureFailpoint. In case of a sharded fixture, the failpoint will be enabled on a mongos.
      Currently the behaviour is disabled for cluster with multiple mongos because that would cause only one mongos to have the failpoint configured. Subsequent commands (including the disabling or waiting of the failpoint) could still be randomly dispatched.
      However we could solve this easily by

      • pinning the mongos used to execute configureFailPoint with mode "alwaysOn" (if the command returns "ok")
      • redirect any subsequent command against the pinned mongos
      • unpin once we received a configureFailPoint with mode "off" (if the command returns "ok")

      We should also manage the case of nested failpoints, and unpin only when received the last configureFailPoint with mode "off" 
      After that, we can enable multi-routing on the excluded tests which can be found by looking for

      // pinToSingleMongos due to configureFailPoint 
      TestData.pinToSingleMongos = true; 

            Assignee:
            Enrico Golfieri
            Reporter:
            Enrico Golfieri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: