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

Sharding index catalog replace is not idempotent and observers can be executed on rollback

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2023-02-20, Sharding EMEA 2023-03-06

      Oplog entries can be re-applied during a rollback, which means that functions related to sharding's index catalog must be idempotent, and most check the latest index version before doing anything.

      Most functions have this check, except replace. The purpose of this ticket is to add the check for replace.

      Additionally, the shard server op observer in-memory changes for the index catalog currently can be executed during recovery, which makes it hard to reason about the observers actions overall. We could add a check to prevent them doing anything if we are in recovery, and let the sharding recovery service to handle the in-memory state.

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: