Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68777

BalancerCollectionStatus may report balancerCompliant too early

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • None
    • ALL
    • Sharding EMEA 2022-09-05, Sharding EMEA 2022-09-19, Sharding EMEA 2022-10-03
    • 11

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              silvia.surroca@mongodb.com Silvia Surroca
              allison.easton@mongodb.com Allison Easton
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: