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

Support explain for timeseries deletes

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • Query Execution
    • None
    • Query Integration
    • Fully Compatible
    • Execution Team 2023-04-03

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: