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

Ensure _completeOnError is set when necessary in all ShardingDDLCoordinator implementations

    XMLWordPrintable

Details

    • Task
    • Status: Open
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • Sharding
    • 3

    Description

      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);
      

      Attachments

        Activity

          People

            backlog-server-sharding-emea Backlog - Sharding EMEA
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: