Operational Defect Database

BugZero found this defect 32 days ago.

MongoDB | 2644929

Create tracked/sharded collection can commit with chunks belonging to a shard that was just removed

Last update date:

4/17/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

CreateCollectionCoordinator first chooses the shards that will own chunks and later [commits the metadata to the configsvr|https://github.com/mongodb/mongo/blob/ac8dae158c37de49c03c4139649f775adf888c8d/src/mongo/db/s/create_collection_coordinator.cpp#L1597-L1605. By the time we commit, one of the shards where we place chunks might have been removed. If that happens, some config.chunks documents will point to a shardId that is no longer part of the cluster. This results in: The ShardingDDLCoordinator never completing because [this routing table refresh|https://github.com/mongodb/mongo/blob/ac8dae158c37de49c03c4139649f775adf888c8d/src/mongo/db/s/create_collection_coordinator.cpp#L1928-L1929 fails repeatedly. Routers see the new collection exists (has been committed), but are unable to write to it.

Top User Comments

JIRAUSER1257318 commented on Wed, 17 Apr 2024 09:35:42 +0000: Duplicate of SERVER-86015

Steps to Reproduce

repro.js

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...