[SERVER-65666] Do not create chunks on draining shards when sharding a new collection Created: 14/Apr/22  Updated: 31/Jan/24  Resolved: 08/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0, 7.0.5, 6.0.13, 5.0.24

Type: Task Priority: Major - P3
Reporter: Randolph Tan Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File SERVER-65666    
Issue Links:
Backports
Duplicate
is duplicated by SERVER-50441 Hash-sharding an empty collection sho... Closed
Related
related to SERVER-86015 ShardCollection should not create chu... Open
related to SERVER-50441 Hash-sharding an empty collection sho... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0, v6.0, v5.0
Sprint: Sharding EMEA 2022-06-13, Sharding EMEA 2022-06-27, Sharding EMEA 2023-10-02, Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30, CAR Team 2023-11-13
Participants:

 Description   

ShardCollection currently gets the list of all shards from the ShardRegistry without taking into account whether a shard is draining or not.



 Comments   
Comment by Githook User [ 27/Nov/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-65666 Do not create chunks on draining shards when sharding a new collection
Branch: master
https://github.com/mongodb/mongo/commit/5cf2bf2414570f215de40017d6f24cb14c1d5404

Comment by Githook User [ 21/Nov/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-65666 Do not create chunks on draining shards when sharding a new collection
Branch: v5.0
https://github.com/mongodb/mongo/commit/4374273b4a775a7a6d3a11e0407346c07ad615ec

Comment by Githook User [ 20/Nov/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-65666 Do not create chunks on draining shards when sharding a new collection
Branch: v6.0
https://github.com/mongodb/mongo/commit/033773d82f80399270685ba8a37166edadd4a762

Comment by Githook User [ 15/Nov/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-65666 Do not create chunks on draining shards when sharding a new collection
Branch: v7.0
https://github.com/mongodb/mongo/commit/31eace026582bf5849a04282fd0eac41c7f2fdbb

Comment by Githook User [ 08/Nov/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-65666 Do not create chunks on draining shards when sharding a new collection
Branch: master
https://github.com/mongodb/mongo/commit/1a336d1fba69e3ccf668fb00111c4ab413e35db8

Comment by Antonio Fuschetto [ 17/Oct/23 ]

> Will this ticket enable reshardCollection to exclude draining shards in its operation too?

Yes. The idea is to implement draining shard filter in InitialSplitPolicies, which affects both shardCollection and reshardCollection commands.

Comment by Ratika Gandhi [ 17/Oct/23 ]

Will this ticket enable reshardCollection to exclude draining shards in its operation too? 

Comment by Max Hirschhorn [ 15/Sep/23 ]

It would be convenient and appreciated if all of the InitialSplitPolicies which can be returned would account for the shards' draining state when determining chunk placement. In particular, resharding similar to shardCollection calls through to ShardRegistry::getAllShardIds() and uses that list in its SamplingBasedSplitPolicy.

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