[SERVER-73398] Invariant may be hit when downgrading from v6.0 due to moveChunk request without max key Created: 27/Jan/23  Updated: 29/Oct/23  Resolved: 30/Jan/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.0.3, 6.0.4
Fix Version/s: 6.0.5

Type: Bug Priority: Major - P3
Reporter: Silvia Surroca Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-65816 Change balancer policy to balance on ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2023-02-06
Participants:
Linked BF Score: 59

 Description   

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.



 Comments   
Comment by Githook User [ 30/Jan/23 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-73398 always invoke moveChunk when both bounds are set
Branch: v6.0
https://github.com/mongodb/mongo/commit/61c1c2e9660b3d6b9fc05f0906109bcdb556c67e

Generated at Thu Feb 08 06:24:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.