[SERVER-12791] Unable to killOp count stage of query execution Created: 19/Feb/14  Updated: 10/Dec/14  Resolved: 24/Feb/14

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

Type: Bug Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: hari.khalsa@10gen.com
Resolution: Done Votes: 0
Labels: killop, query
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

When running a count after setting the kill flag, the count will reach completion without being killed.



 Comments   
Comment by Githook User [ 24/Feb/14 ]

Author:

{u'username': u'hkhalsa', u'name': u'Hari Khalsa', u'email': u'hkhalsa@10gen.com'}

Message: SERVER-12791 interrupt checking is done a layer above stages, some dbtest nits
Branch: master
https://github.com/mongodb/mongo/commit/0ffa44a9bda36dbab227ed4514650773bbf59411

Comment by hari.khalsa@10gen.com [ 24/Feb/14 ]

This actually works. The interrupt checking is a layer above the count stage iteration. Every stage is wrapped in a PlanExecutor and/or Runner and that is where we check for an interrupt.

Comment by Eric Milkie [ 19/Feb/14 ]

A test has been proposed that essentially inserts a bunch of documents, sets the kill flag, and then runs a Count PlanStage and checks to see that it doesn't reach the end before checking the flag.
What guarantees that the test of 1000 documents should always check the kill flag in these stages in general – are we depending on the yielding mechanism, or should there be explicit kill checks? I would expect that depending on the yielding mechanism should be enough for correct operation, and yet in the test I'm not sure that inserting 1000 documents means that we are guaranteed to yield without explicitly comparing with the yield policy.

Comment by Eric Milkie [ 19/Feb/14 ]

Just in case Hari is OOO, can you post reproduction steps?
I don't understand "run a count" after registering a killOp. By "registering" do you mean when the kill flag is set in the CurOp?

Generated at Thu Feb 08 03:29:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.