[SERVER-74525] Support explain for timeseries deletes Created: 01/Mar/23  Updated: 29/Oct/23  Resolved: 03/Apr/23

Status: Closed
Project: Core Server
Component/s: Query Execution
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Yoon Soo Kim Assignee: Yoon Soo Kim
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to SERVER-75478 Support explain for timeseries updates Closed
split to SERVER-75518 Support explain for deleteOne on a sh... Closed
Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-04-03
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 03/Apr/23 ]

Author:

{'name': 'Yoonsoo Kim', 'email': 'yoonsoo.kim@mongodb.com', 'username': 'yun-soo'}

Message: SERVER-74525 Support explain for timeseries deletes
Branch: master
https://github.com/mongodb/mongo/commit/140387a6925f88990dfea22429228bd89da04e02

Generated at Thu Feb 08 06:27:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.