Details
Description
MongoDocumentStore constructs a malformed query for bulk update of new documents. The query is:
{ "_id" : { "$not" : { "$exists" : "_modCount"}}}
while it actually should be:
{ "_id" : "<some-id>" , "_modCount" : { "$exists" : false}}
It doesn't seem to do any harm in a non-sharded deployment. The query does not mistakenly match documents.
However there is a problem when MongoDB is shareded and the calls are routed through mongos. The bulk update become very slow (more than a factor of 10). I assume mongos cannot figure out where to route the bulk update and resorts to executing the updates individually.
Attachments
Attachments
Issue Links
- relates to
-
OAK-3559 Bulk document updates in MongoDocumentStore
- Closed