I wonder the work flow of sharding cluster in Tag-Aware Sharding.
--- Sharding Status ---
sharding version: {
"_id" : 1,
"version" : 3,
"minCompatibleVersion" : 3,
"currentVersion" : 4,
"clusterId" : ObjectId("546df06d63a15917a8356f4e")
}
shards:
{ "_id" : "shard0000", "host" : "hadoop4:27017", "tags" : [ "TR" ] }
{ "_id" : "shard0001", "host" : "hadoop5:27018", "tags" : [ "US" ] }
{ "_id" : "shard0002", "host" : "hadoop6:27017", "tags" : [ "OTHER" ] }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "inventory", "partitioned" : true, "primary" : "shard0000" }
In tag-aware sharding , with mongorestore command via mongos , first all data writes to PrimaryDatabase and then migrate the appropriate chunks ?
Or it can fill the appropriate chunk according to tagRange at the beggining of the insert?
For example , when i insert {country:"US",keyword:"abc"} document , at first it goes to shard0001 or goes to the primary database shard0000 and then chunk migration to shard0001?
Asked by Şeref Acet
(121 rep)
Nov 20, 2014, 08:18 PM
Last activity: May 28, 2025, 11:01 AM
Last activity: May 28, 2025, 11:01 AM