[SERVER-11328] Allow concurrent draining shards Created: 23/Oct/13  Updated: 19/May/20  Resolved: 13/Aug/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.2.1, 4.3.1

Type: Improvement Priority: Major - P3
Reporter: Remon van Vliet Assignee: Kaloian Manassiev
Resolution: Done Votes: 4
Labels: PM229
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Issue Links:
Backports
Depends
depends on SERVER-35076 Integrate the Balancer policy support... Backlog
Documented
is documented by DOCS-12952 Investigate changes in SERVER-11328: ... Closed
Duplicate
is duplicated by SERVER-23975 migrating chunks from one shard to an... Closed
is duplicated by SERVER-24006 Allow multiple shards to be marked as... Closed
is duplicated by SERVER-27455 Allow multiple 'draining' shards Closed
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Sharding 2019-08-12, Sharding 2019-08-26
Participants:
Case:

 Description   

Currently only one shard can be removed at a time. I trust that this was changed for a good reason but I feel a distinction should be made between actively draining a shard (which was problematic to do for more than one shard at the same time apparently) and tagging a shard as draining.

The reason being is currently if we want to remove 5 shards for example and when the first of those 5 shards is draining it will potentially move its chunks to one of the other 4 shards that we want to remove anyway. This makes our cluster down scales unnecessarily slow since it's needlessly moving the same chunks around multiple times.

The proposed solution is as follows :

  • Allow marking multiple shards as "draining"
  • Balancer picks one of these draining shards as the one that is going to be drained completely
  • Balancer avoids moving chunks to shards that are marked as "draining"


 Comments   
Comment by Sheeri Cabral (Inactive) [ 14/Jan/20 ]

Note that the actual solution allows more than one shard to drain at a time, so the actual solution is:

  • Allow marking multiple shards as "draining"
  • Balancer drains shards, one chunk per shard
  • Balancer avoids moving chunks to other shards that are marked as "draining"
Comment by Githook User [ 16/Aug/19 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-11328 Allow more than one shard to be in 'draining' mode

(cherry picked from commit 52b0ba71843026f670b07a18f93d0db11b1c6852)
Branch: v4.2
https://github.com/mongodb/mongo/commit/ba2980dab6a32f9eaa59c9c41a3b6f9cf456e164

Comment by Githook User [ 12/Aug/19 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-11328 Allow more than one shard to be in 'draining' mode
Branch: master
https://github.com/mongodb/mongo/commit/52b0ba71843026f670b07a18f93d0db11b1c6852

Comment by Remon van Vliet [ 23/Oct/13 ]

Was not aware of that. Good to know while we wait for this fix. Thanks!

Comment by Scott Hernandez (Inactive) [ 23/Oct/13 ]

Currently there is a workaround to keep the chunks from moving to those other shards until this feature is scheduled/done which is to set the shard maxSize to 1, or some really low number, which will keep the balancer from moving any chunks there (like during draining).

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