[SERVER-29922] killop.js should check that numYields is positive before killing Created: 29/Jun/17  Updated: 30/Oct/23  Resolved: 27/Jul/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Sprint: Query 2017-07-31
Participants:
Linked BF Score: 0

 Description   

In killop.js, we check that a find is running, and then kill the operation. We then check that the operation is set as killPending. This assumes that the operation had already yielded before we kill it, so that it gets marked as killPending instead of being killed immediately. We should verify here that the operation has numYields > 0.

While we are modifying this test, we could also add a filter to the currentOp in the error output, to make debugging easier.



 Comments   
Comment by Githook User [ 27/Jul/17 ]

Author:

{'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile', 'name': 'Tess Avitabile'}

Message: SERVER-29922 killop.js should check that numYields is positive before killing
Branch: master
https://github.com/mongodb/mongo/commit/aeb063081910c049c6ddad9484f1472407425292

Comment by Tess Avitabile (Inactive) [ 27/Jul/17 ]

Note the above comment was for the original plan to check waitingForLock.

Comment by Tess Avitabile (Inactive) [ 20/Jul/17 ]

Unfortunately, the failpoint setYieldAllLocksHang does not set waitingForLock in the currentOp output. waitingForLock is set here if there is a valid waiting resource. However, when we are pausing for setYieldAllLocksHang, we have just released all locks. This removes all resources from the lock state.

Therefore this strategy for checking to see if we have reached the fail point will not work.

Generated at Thu Feb 08 04:22:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.