Chunk operations don't serialize with the critical section of some DDLs

XMLWordPrintableJSON

    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v9.0
    • CAR Team 2026-08-03
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Since CreateCollectionCoordinator doesn't disable chunkOperations (as it operates on a collection that doesn't exist), chunk operations have an opportunity window after createCollection commits and before it releases the critical section where they may attempt to acquire/release the CS while still acquired by createCollection .

      RenameCollection can also trigger this bug. In general, any time a DDL coordinator holds the CS of a collection while the allowChunkOperations flag is true, this bug can happen.

      Migrations don't seem to be affected because they do a forced refresh, which serializes with the CS (both the source and the destination sides), but seems to be by accident and we'll probably want to remove those refreshes in the future with auth shards.

      This bug hits a tassert, so from the user's POV, the operation (a chunk operation) just fails with the tassert code as an error, and the occurrence is logged by mongod edit: since chunk operations are now coordinators, the chunk operation encountering that tassert just retries with exponential backoff (max 1 second), so the user sees nothing. The tassert still generates an error log line. There are no other consequences. If the cluster runs on Atlas, it generates an AF ticket.

            Assignee:
            Aitor Esteve Alvarado
            Reporter:
            Aitor Esteve Alvarado
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: