Follow-up of SERVER-129905
Problem
The check_uuids_consistent_across_cluster hook always succeeds without performing any checks on release branches. Around MongoDB 5.0, config.chunks became keyed by uuid instead of ns (SERVER-53105,SERVER-59052), but the hook still aggregates with $group: {_id: "$ns", ...}. Since chunks documents no longer have an ns field, the aggregation returns no documents and the hook is effectively a no-op.
Fix
Update the aggregation to group by uuid so the hook validates UUID consistency across the cluster again.
Background
On master, the hook was removed instead (commit 728e242d, SERVER-129905), since checkMetadataConsistency already covers these checks and more (this is because on master we don't have to check config.cache because authoritative sharding is always used). For release branches, the decision is to fix the hook, so that we can keep the config.cache check.
- is related to
-
SERVER-129905 The check_uuids_consistent_across_cluster hook always succeeds without any checks due to broken config.chunks aggregation
-
- Closed
-
-
SERVER-52847 Make timestamp required in CollectionType and ShardCollectionType IDL
-
- Closed
-
-
SERVER-53105 Remove namespace field from config.chunks
-
- Closed
-
-
SERVER-59052 Remove deprecated ChunkType::ns
-
- Closed
-