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

Orphaned system.buckets collections

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc3, 5.1.0-rc0
    • Affects Version/s: 5.0.0-rc0
    • Component/s: None
    • Fully Compatible
    • ALL
    • v5.0
    • Hide
       > db.createCollection('coll1' )
      { "ok" : 1 }
       > show collections
       coll1
       > 
       > db.createCollection('coll1', { timeseries: \\{ timeField: 'ts' }} )
      { "ok" : 0, "errmsg" : "Collection already exists. NS: test.coll1", "code" : 48, "codeName" : "NamespaceExists" }
      > 
       > show collections
       coll1
       system.buckets.coll1
       > 
       > db.coll1.drop()
       true
       > 
       > show collections
       system.buckets.coll1
       
      Show
      > db.createCollection('coll1' ) { "ok" : 1 } > show collections coll1 > > db.createCollection('coll1', { timeseries: \\{ timeField: 'ts' }} ) { "ok" : 0, "errmsg" : "Collection already exists. NS: test.coll1", "code" : 48, "codeName" : "NamespaceExists" } > > show collections coll1 system.buckets.coll1 > > db.coll1.drop() true > > show collections system.buckets.coll1
    • Execution Team 2021-06-28

      There is a path where a system.buckets collection can be orphaned if a previously created collection shares the namespace of a proposed createCollection with timeseries options. This bug can likely be addressed in the createCollection path for timeseries where a system.buckets collection is created prior to any namespace checking for existing collections. 

            Assignee:
            henrik.edin@mongodb.com Henrik Edin
            Reporter:
            michael.gargiulo@mongodb.com Michael Gargiulo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: