I tried to run setIndexCommitQuorum against a mongos on a non-existent index build and the command returns successfully:
{
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1620827363, 2),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1620827363, 2)
}
Running the same command against the primary mongod returns the expected result:
{
"ok" : 0,
"errmsg" : "Cannot find an index build on collection 'repro.repro' with the provided index names",
"code" : 27,
"codeName" : "IndexNotFound",
"$gleStats" : {
"lastOpTime" : {
"ts" : Timestamp(1620827362, 16),
"t" : NumberLong(1)
},
"electionId" : ObjectId("7fffffff0000000000000001")
},
"lastCommittedOpTime" : Timestamp(1620827363, 2),
"$configServerState" : {
"opTime" : {
"ts" : Timestamp(1620827362, 22),
"t" : NumberLong(-1)
}
},
"$clusterTime" : {
"clusterTime" : Timestamp(1620827363, 2),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1620827363, 2)
}