mongodb - Sharding is not happening for the second Shard -


i have setup sharding 2 nodes (two different hosts). have 650 mb table. have chosen year sharding key. data has years 2010 2014. have configured chunk size default (which 64 mb). result of db.collection.stats

mongos> db.ctest.stats(1024 * 1024)  {        "sharded" : true,        "ns" : "dbtest.ctest",        "count" : 244000,        "numextents" : 10,        "size" : 93,        "storagesize" : 123,        "totalindexsize" : 7,        "indexsizes" : {                "_id_" : 7        },        "avgobjsize" : 0.0003811475409836066,        "nindexes" : 1,        "nchunks" : 1,        "shards" : {                "shard0001" : {                        "ns" : "dbtest.ctest",                        "count" : 244000,                        "size" : 93,                        "avgobjsize" : 0.0003811475409836066,                        "storagesize" : 123,                        "numextents" : 10,                        "nindexes" : 1,                        "lastextentsize" : 39,                        "paddingfactor" : 1,                        "systemflags" : 1,                        "userflags" : 0,                        "totalindexsize" : 7,                        "indexsizes" : {                                "_id_" : 7                        },                        "ok" : 1                }        },        "ok" : 1  }  

i see "sharded" value equal "true" , sh.status shows me result

mongos> sh.stats mongos> sh.status() --- sharding status --- sharding version: {     "_id" : 1,     "version" : 3,     "mincompatibleversion" : 3,     "currentversion" : 4,     "clusterid" : objectid("53302f0d24ca08864d73449c") } shards:     {  "_id" : "shard0000",  "host" : "localhost:10001" }     {  "_id" : "shard0001",  "host" : "mongod0.net:10001" }     {  "_id" : "shard0002",  "host" : "mongod1.net:10002" } databases:     {  "_id" : "admin",  "partitioned" : false,  "primary" : "config" }     {  "_id" : "dbtest",  "partitioned" : true,  "primary" : "shard0001" }             dbtest.ctest                     shard key: { "year" : 1 }                     chunks:                             shard0001       1                     { "year" : { "$minkey" : 1 } }                           -->> { "year" : { "$maxkey" : 1 } } on : shard0001 timestamp(1, 0) 

i not getting point why shard2 not getting populated. chosen key low cardinality 1 , number of rows evenly distributed data.

where have gone wrong here?

try force using sh.splitat on mongo shell


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -