[SERVER-28251] Fix race condition in index_killop.js Created: 08/Mar/17 Updated: 11/Sep/18 Resolved: 10/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.18, 3.6.0-rc4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | James Wahlin | Assignee: | Xiangyu Yao (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Backport Requested: |
v3.4
|
||||||||
| Sprint: | Storage 2017-11-13 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
index_killop.js uses the 'hangAfterStartingIndexBuild' fail point in order to freeze an index build in-flight and allow for the build to be killed via killop. Execution of the killop depends on a call to 'checkForInterrupt()' from within the fail point block to allow the killop to execute. As implemented it is possible for index_killop.js to fail in the following scenario:
To fix we could:
As part of this work we should look to reimplement the 'hangAfterStartingIndexBuild' failpoint to be part of the insert loop, taking advantage of the checkForInterrupt() call performed there. Removing the failpoint-only call allows us to more closely test real-world behavior. Steps to reproduce:
|
| Comments |
| Comment by Githook User [ 11/Sep/18 ] |
|
Author: {'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}Message: (cherry picked from commit 6a416de4330d6368ea77bace41e297082e8cf3bd) |
| Comment by Githook User [ 10/Nov/17 ] |
|
Author: {'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}Message: |