dropIndexes may get retried after successfully return due to stepdowns [all-feature-flags only issue]

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2025-10-27
    • 0
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      The code in shardsvrDropIndexesCommand is responsible for spawning a DropIndexesCoordinator and waiting for its completion.

      To be able to return all the shard responses to the user, the coordinator will provide its 'result' attribute at the end. If 'result' is populated, it'll mean that all the shards have finished executing the dropIndexes operation, and so, we'll ignore the overall completion status returned by the coordinator and will return a successful response to the user.

      However, it can happen that all shards have successfully run their dropIndex operation, the 'result' attribute gets populated, and yet the coordinator fails due to a step down. In this case, the coordinator's persistent document won't get deleted, and so we may return a successful response to the user and, later, retry all the dropIndexes operations on the new primary node.

      Note that there are no affected versions because the feature flag featureFlagDropIndexesDDLCoordinator is not enabled yet.

            Assignee:
            Silvia Surroca
            Reporter:
            Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: