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

Can create a view that seems (to listCollections) to be a time series collection

    • Minor Change
    • ALL
    • Hide
      db> db.createView("view1","something",[])
      { ok: 1 }
      db> db.createView("view2","system.buckets.time",[]) 
      { ok: 1 }
      db> show collections
      view1 [view]
      view2 [time-series]     <----- looks like a valid time series but it's not
      system.views
      db> db.createCollection("time",{timeseries:{timeField:"time"}})
      { ok: 1 }
      db> show collections
      time [time-series]  <---- this makes view2 to disappear although still being present in the system.views
      view1 [view]
      system.buckets.time
      system.views
      db> db.time.drop()
      true
      db> show collections
      view1 [view]
      view2 [time-series]    <-- dropping "time" brings view2 back to the list
      system.views
      
      Show
      db> db.createView( "view1" , "something" ,[]) { ok: 1 } db> db.createView( "view2" , "system.buckets.time" ,[]) { ok: 1 } db> show collections view1 [view] view2 [time-series] <----- looks like a valid time series but it's not system.views db> db.createCollection( "time" ,{timeseries:{timeField: "time" }}) { ok: 1 } db> show collections time [time-series] <---- this makes view2 to disappear although still being present in the system.views view1 [view] system.buckets.time system.views db> db.time.drop() true db> show collections view1 [view] view2 [time-series] <-- dropping "time" brings view2 back to the list system.views
    • Execution Team 2022-05-02, Execution Team 2022-05-16
    • 68

      I thing the intention behind hiding custom views on time series collections was to disallow manual creation of those. For now you can create them and they behave oddly.
       

       

            Assignee:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Reporter:
            wojciech.waga@gmail.com Wojciech Waga
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: