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

killOp on foreground index build does not take effect until the end of the index build

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.7.5
    • Affects Version/s: 2.6.0, 2.6.3
    • Component/s: Index Maintenance
    • None
    • Fully Compatible
    • ALL
    • Hide
      1. create a database with a few million documents with some custom fields (exact numbers don't matter).
      2. start a custom foreground index build
      3. in another shell, issue a killOp against the running index build (currentOp first obviously)
      4. note the index build basically until close to the end (always gets to 94+% of the bulk sort in my testing)

      repeat these steps in 2.4.10 and observe the index build aborts in around the time it takes to print the next status update to the log.

      Show
      create a database with a few million documents with some custom fields (exact numbers don't matter). start a custom foreground index build in another shell, issue a killOp against the running index build (currentOp first obviously) note the index build basically until close to the end (always gets to 94+% of the bulk sort in my testing) repeat these steps in 2.4.10 and observe the index build aborts in around the time it takes to print the next status update to the log.

      db.killOp on a foreground index build is accepted and marks the operation "killPending" : true but nothing actually happens. The index just carries on building. It aborts (correctly) near the end of the process before the commit step.

      In 2.4.10 a killOp foreground index build usually only takes tens of seconds before it correctly stops. In 2.6.3, using the same dataset and the same commands, the killOp can take hours to have an effect.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: