Issue confirmed on my end.
MongoDB Enterprise Free-shard-0:PRIMARY> db.zips.explain().aggregate([{"$match": {city: "NEW YORK"}}])
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "5e9099160ff7e0434fe7c98c_sample_training.zips",
"indexFilterSet" : false,
"parsedQuery" : {
"city" : {
"$eq" : "NEW YORK"
}
},
"queryHash" : "0491F17A",
"planCacheKey" : "0491F17A",
"optimizedPipeline" : true,
"winningPlan" : {
"stage" : "COLLSCAN",
"filter" : {
"city" : {
"$eq" : "NEW YORK"
}
},
"direction" : "forward"
},
"rejectedPlans" : [ ]
},
"serverInfo" : {
"host" : "atlas-8vl55a-shard-00-01.ruudt.mongodb.net",
"port" : 27000,
"version" : "4.2.8",
"gitVersion" : "43d25964249164d76d5e04dd6cf38f6111e21f5f"
},
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1599050624, 1),
"signature" : {
"hash" : BinData(0,"u5KzhKzaKG/yBSkDRg4/zS2OmrI="),
"keyId" : NumberLong("6813510425880035331")
}
},
"operationTime" : Timestamp(1599050624, 1)
}
MongoDB Enterprise Free-shard-0:PRIMARY> db.zips.explain(true).aggregate([{"$match": {city: "NEW YORK"}}])
uncaught exception: Error: explain failed: {
"ok" : 0,
"errmsg" : "(Unauthorized) not authorized on sample_training to execute command { aggregate: \"zips\", pipeline: [[{$match [{city NEW YORK}]}]], cursor: { } }",
"code" : 8000,
"codeName" : "AtlasError"
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
throwOrReturn@src/mongo/shell/explainable.js:32:19
constructor/this.aggregate@src/mongo/shell/explainable.js:122:24
@(shell):1:1
I don’t see this documented in:
I escalated this conversation to the Atlas team. I’m waiting for an answer at the moment.
That being said - there is probably a reason for this operation to not be supported on shared environment and I don’t have this issue with an M10 cluster.