-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.6.0
-
Component/s: Sharding
-
None
-
ALL
// There are 2 documents in collection virus already.
> db.virus.find()
// Using shard key and operator in criteria, and using modifier $set in objNew
> db.virus.update({did:1,recv_time:{$gte:3}},{$set:{n:3}},true,false)
// document inserted even recv_time is null
> db.virus.find()
// could query with recv_time==null
> db.virus.find(
)
{ "_id" : ObjectId("4c6cf8f55d602a71c933a105"), "did" : 1, "n" : 3 }// Can't update via ObjectId
> db.virus.update({_id:ObjectId("4c6cf8f55d602a71c933a105")},
)
right object doesn't have full shard key
// Can't update by criteria with shard key
> db.virus.update(
,
{n:4})
shard key must be in update object
- related to
-
SERVER-1689 Only allow equality matches on shard key in updates with upsert=true
- Closed