-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: sh
-
Iteration Ragfish, Iteration Seahorse, Iteration Unicornfish, Iteration Velvet Crab
-
Not Needed
On version 5.0 the config.chunks document format was changed (SERVER-53105). Before, the chunk documents had a 'ns' field (and index) that allowed joining with config.collections. After SERVER-53105, chunks have a 'uuid' field (and index) that also allows joining with config.collections and no longer have 'ns'.
Mongosh's sh.status() and getShardDisbribution() query config.chunks to find all chunks belonging to a collection. To Support both config.chunks format, an '$or: [ns, uuid]' filter was built (MONGOSH-740). This is correct, but it is not performant because it will need to COLLSCAN – either the uuid index exists, or the ns index exists, but not both at the same time.
This can be addressed if mongosh is made to query chunks like the legacy shell does (SERVER-56875): Look for the corresponding config.collections entry. If it has a 'timestamp' field, then chunks have the new format and should be queried by 'uuid'; otherwise query by 'ns'. This will always make use of an index.
- is related to
-
MONGOSH-1327 sh.status() should show full list of tag ranges in verbose mode only
- Closed
-
SERVER-56875 sh.status() and printShardingStatus() no longer output chunks
- Closed
- related to
-
MONGOSH-740 Investigate recent failures with latest server builds
- Closed