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

Harden shard removal in `secondary_reads_waitForShardingInit.js` test teardown

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc12
    • Affects Version/s: 8.0.0-rc0, 8.1.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • v8.0
    • CAR Team 2024-07-08
    • 0

      Issue

      When running the jstests/sharding/secondary_reads_waitForShardingInit.js test under the sharding_csrs_continuous_config_stepdown suite, we have sporadically seen a test failure due to a removeShard operation removing a shard, and then getting interrupted due to a CSRS step-down.
      The returned error makes the mongos retry the removeShard operation, which in-turn results in a ShardNotFound error back to the test (instead of the usual response document of the removeShard command). This issue is already known and tracked under SERVER-32553.

      Fix

      To prevent its occurrence for the given case, we should make sure that secondary_reads_waitForShardingInit.js calls removeShard through a helper, which accepts the ShardNotFound error as a correct result, similarly to how it's done in other tests such as jstests/sharding/store_historical_placement_data.js (see SERVER-89414).

            Assignee:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Reporter:
            robert.sander@mongodb.com Robert Sander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: