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

Orphaned system.buckets collections

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 5.0.0-rc0
    • 5.0.0-rc3, 5.1.0-rc0
    • 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

    Description

      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. 

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: