[SERVER-39234] Sharding an empty collection in mixed-shard version configurations may leave all chunks on the primary shard Created: 28/Jan/19  Updated: 29/Oct/23  Resolved: 30/Jan/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.0.5
Fix Version/s: 4.0.6, 4.1.8

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Sharding 2019-02-11
Participants:
Linked BF Score: 50

 Description   

In partially upgraded clusters, whose config server is at version 4.0.5 and shards are at pre-4.0.3 (includes 3.6), sharding an empty collection with hashed sharding or performing map/reduce with outputting to an empty collection (with any kind of sharding) will end up placing all chunks on the primary shard of the collection.

This is not a correctness issue, but it means that the balancer will have to move non-empty chunks later on and thus defeats the purpose of pre-sharding the collection.



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

Author:

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

Message: SERVER-39234 Ensure `shardCollection` initial split works the same between config server and shard primary
Branch: master
https://github.com/mongodb/mongo/commit/1c61dfa3307c2009dd29c893b8d2b08af6bcf7d6

Comment by Githook User [ 30/Jan/19 ]

Author:

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

Message: SERVER-39234 Ensure `shardCollection` initial split works the same between config server and shard primary

(cherry picked from commit 1c61dfa3307c2009dd29c893b8d2b08af6bcf7d6)
Branch: v4.0
https://github.com/mongodb/mongo/commit/c9a446e51769484fc4aa911046942752c4cb9cdb

Comment by Githook User [ 30/Jan/19 ]

Author:

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

Message: SERVER-39234 Remove unused variable from the shardCollection unit-test
Branch: master
https://github.com/mongodb/mongo/commit/93aae1b4159d4e26e6b3ec5c6b870160ba63309f

Generated at Thu Feb 08 04:51:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.