|
Currently explain for timeseries deletes / updates is not supported.
MongoDB Enterprise > db.runCommand({
|
... explain: {
|
... delete: "ts",
|
... deletes: [{q: {x: 1}, limit: 0}]
|
... }
|
... })
|
{
|
"ok" : 0,
|
"errmsg" : "Taking test.ts lock for timeseries is not allowed",
|
"code" : 166,
|
"codeName" : "CommandNotSupportedOnView"
|
}
|
> db.createCollection("ts", {timeseries: {timeField: "t", metaField: "m"}});
|
{ "ok" : 1 }
|
> db.runCommand({explain: {update: "ts", updates: [{q: {m: 1}, u: {$inc: {a: 1}}, multi: true}]}});
|
{
|
"ok" : 0,
|
"errmsg" : "Taking test.ts lock for timeseries is not allowed",
|
"code" : 166,
|
"codeName" : "CommandNotSupportedOnView"
|
}
|
We need to test whether explain command works correctly for the sharded time-series collection too.
|