Tokutek / mongo

TokuMX is a high-performance, concurrent, compressing, drop-in replacement engine for MongoDB | Issue tracker: https://tokutek.atlassian.net/browse/MX/ |
http://www.tokutek.com/products/tokumx-for-mongodb/
703 stars 97 forks source link

implement loader commands through mongos #975

Open leifwalsh opened 10 years ago

leifwalsh commented 10 years ago

notes:

ankurcha commented 10 years ago

In its current form, is there any way to use beginLoad in a sharded environment? It looks like the intention of this issue is to track creation of wrapper commands and the functionality to do this by using commands directly ie db.runCommand is good to go, or am I understanding it wrong?

leifwalsh commented 10 years ago

The only way to do this would be to create a non-sharded collection through mongos, then connect to its primary shard directly (not through mongos) and drop and load the collection there. Right now, beginTransaction and beginLoad are not supported through mongos, which are what you need to do bulk loads.

The work here is to make a mongos command that will start a load on all servers and do the right presplitting so that when the stream of inserts comes in, they'll get spread around to different shards' loaders, then for the mongos to coordinate all of the loader build phases on the shards and commit them.