C# Driver: Updating a sharded environment by shard key (also BsonId), returns more modified than actual sent

56 views
Skip to first unread message

Ron Rejwan

unread,
Aug 13, 2015, 12:03:00 PM8/13/15
to mongodb-user
We are running a sharded environment which the shard key is hashed(_id) (_id being a bsonId).

We ran a large update where we updated around 27,000 documents by _id, the returned modified documents count was near 30,000.

I was wondering why this happened and is this behavior normal? (duplicated data being rebalanced maybe?)

Thanks

Ankit Kakkar

unread,
Aug 20, 2015, 12:12:01 PM8/20/15
to mongodb-user
Hi Ron,

As at MongoDB 3.0, there are several conditions where counts on sharded clusters may report inaccurate results, including: active migrations, orphaned documents (leftover from failed migrations), and non-primary read preferences.

For more information, please see: https://jira.mongodb.org/browse/SERVER-3645.

Regards,
ankit
Reply all
Reply to author
Forward
0 new messages