-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
applyOps with a createIndexes command reports success when given a non-existent UUID but it is actually a no-op.
> db.adminCommand({applyOps: [{op:"c", ui: UUID("a0aff12b-0a98-429b-9f2a-892b57fcdbd5"), ns: "test.$cmd", o: {createIndexes: "test", key: {a:1}, name: "a_1"}}]});
{
"applied" : 1,
"results" : [
true
],
"ok" : 1,
"operationTime" : Timestamp(1535665569, 1),
"$clusterTime" : {
"clusterTime" : Timestamp(1535665569, 1),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
}
}
> db.test.getIndexes()
[ ]
> db.getCollectionInfos()
[ ]
I think it would make more sense for applyOps to report an error in this case.
The same behavior exists on 3.6 and 4.0.
- related to
-
SERVER-32952 applyOps does not validate updates
-
- Backlog
-