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

running compact resets systemFlag to 0

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.6.3
    • Component/s: Index Maintenance, Storage
    • None
    • ALL
    • Hide
      db.createCollection( "x2")
      db.x2.stats().systemFlags
      //db.runCommand({collMod:"x2",usePowerOf2Sizes:false})
      db.runCommand({compact:"x2"})
      db.x2.stats().systemFlags
      
      Show
      db.createCollection( "x2" ) db.x2.stats().systemFlags //db.runCommand({collMod: "x2" ,usePowerOf2Sizes: false }) db.runCommand({compact: "x2" }) db.x2.stats().systemFlags

      The symptom is that:
      When compact is run, the systemFlags bit is set to 0.

      I believe it is because in
      collection_compact.cpp

       Status status = _indexCatalog.dropAllIndexes( true );
      

      leads to
      index_catalog.cpp

                  _details->clearSystemFlag( NamespaceDetails::Flag_HaveIdIndex );
      

      But then it's never re-set for the rebuild of the _id index again.

            Assignee:
            Unassigned Unassigned
            Reporter:
            rohit.nijhawan@10gen.com rohit.nijhawan@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: