MongoDB - Loading data into sharded DB with balancer on

51 views Asked by At

MongoDB - Anyone has encountered this problem?: Loading .5M docs (using node js script reading csv file) into sharded database(3 shards) in mongoDB (v3.0.3) with balancer on. Multiple databases sharing the shards. Noticed following behavior:

  1. missing data (range of 1 to 5 docs) which has happened intermitently. Shard key is hashed and all docs have this key and value pair.
  2. while data is loading, expected the count to continously increase but noticed it increaes then decreases then increases again

mongos> db.logs.count()

471566

mongos> db.logs.count()

468772

mongos> db.logs.count()

465814

mongos> db.logs.count()

554979

Turning the balancer off did not have the same problem. Any explanation to this? Thanks.

0

There are 0 answers