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

Invariant may be hit when downgrading from v6.0 due to moveChunk request without max key

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.5
    • Affects Version/s: 6.0.3, 6.0.4
    • Component/s: None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2023-02-06
    • 59

      During the balancer round the FCV is checked twice in the following order:

      A) On the selectChunksToMove phase: we check if gBalanceAccordingToDataSize flag is enabled, which is enabled on FCV6.0 and disabled on FCV5.0. If the flag is enabled, we don't store the max key value of the chunk to migrate  since we want to call moveRange intentionally without the max key in order to leave the decision of how much data migrate in hands of the shard.

      B) On the moveChunks phase: we check if FCV is 6.0 or not to either send a moveRange or a moveChunk command to the shard that owns the chunk.

       

      In case of having a downgrade FCV in between A and B, the moveChunk command request will be scheduled without a max key value and this invariant will be hit.

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: