-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
ALL
-
Sharding EMEA 2022-09-05, Sharding EMEA 2022-09-19, Sharding EMEA 2022-10-03
-
11
SERVER-67301 tried to fix the problem that the balancer may make wrong decisions based on the amount of data because of the non transactionality of deleting orphans and updating the orphan counter. However, there is another problem related to this.
Suppose we have 8.1MB of documents and 1MB orphans (total of 9.1MB) on one shard and 5MB of documents on a second shard (with a max chunk size of 1MB)
If the orphans are deleted but the orphan counter is not updated when the balancer asks for datasize, the first shard will report 8.1MB of data minus 1MB orphans (7.1MB) and the second shard will report 5MB data. The balancer will return balancerCompliant since the difference in data is 2.1MB which is less than 3 * 1MB.
Then the orphan counter will be updated and the next round, the first shard will report 8.1MB of data (no orphans) and the second shard will report 5MB of data. The difference is 3.1MB of data and so a chunk will need to be moved from the first shard to the second shard.
On the resolution of this ticket, take into account to remove the extra check of the collection balance status on testing function awaitCollectionBalance.
- is related to
-
SERVER-69136 Tests should consider balancerCollectionStatus may report balancerCompliant too early
- Closed
- related to
-
SERVER-67301 Balancer may perform one unnecessary migration for a completely balanced collection
- Closed