[SERVER-3842] Multiple mongos can interfere in initial sharding Created: 14/Sep/11  Updated: 11/Jul/16  Resolved: 22/Oct/11

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 2.0.2, 2.1.0

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
Operating System: ALL
Participants:

 Description   

The initial chunk split of a newly sharded collection can be interrupted by an autosplit, particularly if the collection is large and the calculation of many split points is slow.

Fix should be to calc (and potentially split) the chunk before creating the sharded collection entry in the config server to prevent other mongoses from detecting the sharded collection.



 Comments   
Comment by auto [ 24/Oct/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: SERVER-3842 - make all initial chunks before marking collection sharded
Branch: v2.0
https://github.com/mongodb/mongo/commit/774ba877171476e605c59f0b49278ffe25c462bf

Comment by auto [ 22/Oct/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: SERVER-3842 - make all initial chunks before marking collection sharded
Branch: master
https://github.com/mongodb/mongo/commit/5f7feee66ca6c1c915852de83a93502a26f64d8e

Comment by Eliot Horowitz (Inactive) [ 30/Sep/11 ]

You should just check your mongos logs for errors and check that the # of chunks (via db.printShardingStatus()) is approximately correct

Comment by m [ 30/Sep/11 ]

I'm running a 2.0.0 standard replica set with some large collections and will be sharding it this weekend. Can you please elaborate on this issue, including precautions and advice/workarounds for making this as smooth as possible.

Current config:
web server (php driver connects to mongo-pri with slaveOk)
mongo-pri
mongo-sec
mongo-arb

Hopeful config:
mongo-config1
mongo-config2
mongo-config3
web server (mongos + php driver connects to localhost with SlaveOk)
mongo-pri
mongo-sec
mongo-arb
mongoshard2-pri
mongoshard2-sec
mongoshard2-arb
mongoshard3-pri
mongoshard3-sec
mongoshard3-arb
mongoshardN-pri
mongoshardN-sec
mongoshardN-arb

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