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

Ensure _completeOnError is set when necessary in all ShardingDDLCoordinator implementations

    • Catalog and Routing
    • 2

      The ShardingDDLCoordinator class automatically retries a list of retriable errors in order to guarantee forward progress until completion. However, there are two ways to alter such behavior: _mustAlwaysMakeProgress and _completeOnError. The latter is a flag that must be set to true whenever an expected error is detected on the instance, and the coordinator must finalize. This can be seen for example in renameCollection, where the initial verifications are performed and then the flag is set in case of an exception.

      The purpose of this ticket is to ensure all implementations of the ShardingDDLCoordinator are properly using this flag, and then, ensure all future implementations handle this appropriately, by adding a dassert that will be hit when an instance violates the expected behavior.

      Such assert can be added in the ShardingDDLCoordinator completion, something like:

      dassert(status.isOK() || _completeOnError || isSteppingDown);
      

            Assignee:
            backlog-server-catalog-and-routing [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: