Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74525

Support explain for timeseries deletes

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: Query Execution
    • None
    • Query Integration
    • Fully Compatible
    • Execution Team 2023-04-03

      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.

            Assignee:
            yoonsoo.kim@mongodb.com Yoon Soo Kim
            Reporter:
            yoonsoo.kim@mongodb.com Yoon Soo Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: