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

Orphaned system.buckets collections

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 5.0.0-rc0
    • Fix Version/s: 5.0.0-rc3, 5.1.0-rc0
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.0
    • Steps To Reproduce:
      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
    • Sprint:
      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

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

              Dates

              Created:
              Updated:
              Resolved: