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

Fix race condition on set_cluster_parameter.js

    • Fully Compatible
    • Sharding EMEA 2022-07-11
    • 11

      set_cluster_param.js tests that the following two actions are serialized:

      • SetClusterParameterCoordinator's propagation of the new parameter value to all shards
      • addShard

      To check that, the tests uses the 'failCommand' failpoint with an 'errorCode' PrimarySteppedDown, which the coordinator will retry on. However, the coordinator only reties the _shardsvrSetClusterParameter command a fixed amount of attempts. Once the attempts are exhausted, the coordinator will release the lock that was ensuring the serialization, and retry again later.

      This is fine, but the test can fail because it can issue the addShard command at a moment where the coordinator is not holding the lock after having exhausted retries.

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: