[SERVER-8817] Balancer can interfere when creating a new hashed sharded collection with numInitialChunks Created: 01/Mar/13  Updated: 06/Dec/22  Resolved: 18/Jul/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.4.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Done Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-19297 shardCollection should take distribut... Closed
Assigned Teams:
Sharding
Operating System: ALL
Participants:
Case:

 Description   

Initial splits can fail when the balancer happen to moveChunks while the shardCollection method tries to do the initial splits.



 Comments   
Comment by Kaloian Manassiev [ 18/Jul/18 ]

Starting with version 3.2 and the fix for SERVER-19297 this issue no longer exists, because shardCollection acquires the collection distributed lock, which means the balancer cannot move chunks for it.

Comment by Andy Schwerin [ 13/Jul/18 ]

Sharding team to evaluate if this is still a bug in current releases and re-triage.

Comment by Asya Kamsky [ 01/Jul/14 ]

I have a presplitting script which specifically refused to run if the balancer is not disabled - I think that's a prudent thing to do whenever there are multiple steps involved that should be executed without another processes affecting state.

Comment by Taylor Dondich [ 13/Mar/14 ]

We need this resolved. Adding collections with numInitialChunks in our workflow is a constant task. Having to disable the balancer while this happens is an extra step that is hacky at best. If it is accidentally left on, bad bad bad things happen (moveChunk migrations continue to show up in aborted state for other collections and can't be resolved).

Generated at Thu Feb 08 03:18:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.