[SERVER-14758] killOp on foreground index build does not take effect until the end of the index build Created: 01/Aug/14 Updated: 27/Feb/15 Resolved: 18/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 2.6.0, 2.6.3 |
| Fix Version/s: | 2.7.5 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Andrew Ryder (Inactive) | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Steps To Reproduce: |
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. |
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Mathias Stearn [ 18/Aug/14 ] | ||||||||||||||||||||||||
|
Resolved by https://github.com/mongodb/mongo/commit/00913e47de5aced5267e44e82ac9e976bbaac089 | ||||||||||||||||||||||||
| Comment by Eric Milkie [ 11/Aug/14 ] | ||||||||||||||||||||||||
|
Replicated index builds are prohibited from being killed by the user. | ||||||||||||||||||||||||
| Comment by Jason R. Coombs [ 09/Aug/14 ] | ||||||||||||||||||||||||
|
Hi Thomas, Please see the referenced CS ticket where another MongoDB employee has replicated the issue using MongoDB 2.4.10. In our case, it was an index on a secondary created in the foreground as replicated from an index on the primary created in the background. Perhaps there's some aspect of the replication that's affecting the behavior. Regards, | ||||||||||||||||||||||||
| Comment by Thomas Rueckstiess [ 09/Aug/14 ] | ||||||||||||||||||||||||
|
Hi Jason, We haven't been able to reproduce this in 2.4. See my comparison between 2.4 and 2.6 above. If you're seeing this in 2.4, can you provide a logfile showing the behavior? What's the exact version of 2.4 you're running? Thanks, Thomas | ||||||||||||||||||||||||
| Comment by Jason R. Coombs [ 09/Aug/14 ] | ||||||||||||||||||||||||
|
This issue affects MongoDB 2.4 also and violates the claim made in the documentation (http://docs.mongodb.org/manual/tutorial/manage-in-progress-indexing-operations/) that foreground index builds can be terminated. | ||||||||||||||||||||||||
| Comment by Thomas Rueckstiess [ 01/Aug/14 ] | ||||||||||||||||||||||||
|
In 2.4.10, an index build gets interrupted immediately.
In 2.6.x (tested 2.6.0 and 2.6.3, same behavior), the index build finishes and only dies in the "bulk commit" phase.
|