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

background ensureIndex blocks too many operations with WiredTiger

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.8.0-rc4
    • Fix Version/s: None
    • Component/s: Storage, WiredTiger
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      1) Create a large collection (I used iibench-mongodb)
      2) drop all secondary indexes it uses
      3) Run: db.purchases_index.ensureIndex(

      {"price":1, "customerid":1}

      ,

      {"background":true}

      )
      4) in another shell run the commands "show collections" and "db.purchases_index.getIndexes()

      The problem does not reproduce with mmapv1.
      The problem was produced with the WT btree

      Show
      1) Create a large collection (I used iibench-mongodb) 2) drop all secondary indexes it uses 3) Run: db.purchases_index.ensureIndex( {"price":1, "customerid":1} , {"background":true} ) 4) in another shell run the commands "show collections" and "db.purchases_index.getIndexes() The problem does not reproduce with mmapv1. The problem was produced with the WT btree

      Description

      The docs state that ensureIndex(..,

      {"background":false}

      ) don't block all operations on a database but that is not the case for WiredTiger.With a long-running background index creation in progress on "purchases_index" the following commands have been blocked for me:

      • show collections -> for the database that contains purchases_index
      • db.purchases_index.getIndexes()
      • db.pi.insert( {"foo":1}

        ) --> "pi" did not exist prior to this insert

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: