-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.2.24, 4.4.24, 5.0.20, 6.0.9
-
Component/s: None
-
Fully Compatible
-
ALL
-
v5.0, v4.4, v4.2
-
Sharding EMEA 2023-09-18
In the migration destination manager, in order to understand if the destination shard already have some chunk, we call CollectionMetadata::getChunks().empty(). This function scans the entire routing table and make a partial copy of it that contains only chunks belonging to the destination shard.
When the routing table for the collection has many chunks, this calls can be extremely expensive.
To avoid this overhead, we could simply use CollectionMetadata::currentShardHasAnyChunks() instead.
- is caused by
-
SERVER-44914 A shard receiving its first chunk should locally drop any indexes not on the donor
- Closed