[SERVER-36950] applyOps createIndexes command with non-existent UUID reports success Created: 30/Aug/18  Updated: 06/Dec/22  Resolved: 17/Jan/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Shane Harvey Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: gm-ack
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-32952 applyOps does not validate updates Backlog
Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Tess Avitabile (Inactive) [ 17/Jan/20 ]

Closing this as Won't Fix. We are not fixing applyOps issues that are not blockers for mongomirror.

Generated at Thu Feb 08 04:44:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.