[SERVER-1292] easier to convert single mongod to sharded system WAS: add an '"onShard" option to the shardCollection command Created: 24/Jun/10  Updated: 12/Jul/16  Resolved: 02/Aug/10

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 1.5.8

Type: Improvement Priority: Major - P3
Reporter: Jeff Lanza Assignee: Alberto Lerner
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Comments   
Comment by auto [ 02/Aug/10 ]

Author:

{'login': 'alerner', 'name': 'Alberto Lerner', 'email': 'alerner@10gen.com'}

Message: SERVER-1292 Test moving and splitting collection from mongod turned shard
http://github.com/mongodb/mongo/commit/07d12c233647a34c72486fa03f38a787d3d4c0c6

Comment by auto [ 30/Jul/10 ]

Author:

{'login': 'alerner', 'name': 'Alberto Lerner', 'email': 'alerner@10gen.com'}

Message: SERVER-1292 When adding a shard, bring all the DBs that mongod carried before
http://github.com/mongodb/mongo/commit/18ff2014651c88aa0cabcd6fd652026d00f60918

Comment by auto [ 30/Jul/10 ]

Author:

{'login': 'alerner', 'name': 'Alberto Lerner', 'email': 'alerner@10gen.com'}

Message: SERVER-1292 For now, don't add a mongod as a shard if it's not empty. Will allow that next.
http://github.com/mongodb/mongo/commit/5a69c45341c23f654832f948febf793c6896e6b4

Comment by auto [ 28/Jul/10 ]

Author:

{'login': 'alerner', 'name': 'Alberto Lerner', 'email': 'alerner@10gen.com'}

Message: SERVER-1292 A bit more prep, separate grid.

{h,cpp}

from config
http://github.com/mongodb/mongo/commit/bceacf2544acfb6c3509ca8db791e90fe41c8599

Comment by auto [ 26/Jul/10 ]

Author:

{'login': 'alerner', 'name': 'Alberto Lerner', 'email': 'alerner@10gen.com'}

Message: SERVER-1292 Prep work by moving shard adding logic to Grid
http://github.com/mongodb/mongo/commit/e53107eeeb37b391e79ed29671fdf635f3f48abd

Comment by Eliot Horowitz (Inactive) [ 24/Jul/10 ]

Yes - that should be the default behavior.
If there is a conflict, addShard should fail.

YOu don't really need --shardsrv at all - just changes ports

Comment by Alberto Lerner [ 23/Jul/10 ]

Do we even need a special option for the behavior? Perhaps addShard could automatically register the databases that it finds in the mongod that became a shard.

One related question is whether a mongod can become a shard without downtime, ie. how to turn on --shardsvr on a mongod that was started without it? Is that a concern, and if so, does it belong to this JIRA?

Comment by Eliot Horowitz (Inactive) [ 24/Jun/10 ]

I see.

What about an option on the "addShard" command like "original"

then when it loads all the dbs from that shard?

Comment by Mathias Stearn [ 24/Jun/10 ]

On second thought this probably belongs in the enablesharding (db-level) command. The idea is that if you have an existing mongod with data, you can add all of your shards to mongos/config-servers first, then shard the existing collection. Right now you need to add the single shard, set all your collections up, then add the other shards. I think allowing the user to specify the default shard when enabling sharding will do the trick.

Comment by Jeff Lanza [ 24/Jun/10 ]

mstearn1 requested I submit the bug. I think it's related to performing some sort of action to migrate to sharding on an already existent database.

Comment by Eliot Horowitz (Inactive) [ 24/Jun/10 ]

What does "onShard" mean?

Generated at Thu Feb 08 02:56:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.