[SERVER-36453] Fix race condition in aggregation_cursor_invalidations.js Created: 03/Aug/18 Updated: 29/Oct/23 Resolved: 30/Aug/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.3, 4.1.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Ian Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Backport Requested: |
v4.0
|
||||||||
| Sprint: | Query 2018-08-13, Query 2018-08-27 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 31 | ||||||||
| Description |
|
Modify the test to check whether there are any open cursors using $listLocalCursors rather than db.serverStatus(). This will allow to test whether there are any open cursors on the collection being used, rather than whether there are any open cursors (which may include cursors opened by background jobs and so on). |
| Comments |
| Comment by Githook User [ 31/Aug/18 ] |
|
Author: {'name': 'Ian Boros', 'email': 'ian.boros@10gen.com'}Message: (cherry picked from commit d1db98c28473ec3474e617b2c668a4b61bec9bcd) |
| Comment by Githook User [ 30/Aug/18 ] |
|
Author: {'name': 'Ian Boros', 'email': 'ian.boros@10gen.com'}Message: |
| Comment by Ian Boros [ 20/Aug/18 ] |
|
There's a race condition in the test here. At the time we kill the operation, the server may hit the checkForInterrupt call within here and not check out the cursor. This would mean that the operation completes without destroying the cursor. |