[SERVER-4844] can't killop an aggregation operation Created: 01/Feb/12 Updated: 11/Jul/16 Resolved: 16/Feb/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Chris Westin |
| Resolution: | Done | Votes: | 0 |
| Labels: | pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Ran a long aggregation operation, wasn't able to kill it with killop and ctrl-c on mongod also seems to hang until the operation finishes. Here is the test I ran
|
| Comments |
| Comment by Githook User [ 23/Oct/14 ] | |||||||||||||||
|
Author: {u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}Message: Closes #836 Signed-off-by: Benety Goh <benety@mongodb.com> | |||||||||||||||
| Comment by auto [ 16/Feb/12 ] | |||||||||||||||
|
Author: {u'login': u'cwestin', u'name': u'U-tellus\\cwestin', u'email': u'cwestin@10gen.com'}Message: | |||||||||||||||
| Comment by auto [ 16/Feb/12 ] | |||||||||||||||
|
Author: {u'login': u'cwestin', u'name': u'U-tellus\\cwestin', u'email': u'cwestin@10gen.com'}Message: | |||||||||||||||
| Comment by auto [ 16/Feb/12 ] | |||||||||||||||
|
Author: {u'login': u'cwestin', u'name': u'U-tellus\\cwestin', u'email': u'cwestin@10gen.com'}Message: | |||||||||||||||
| Comment by Chris Westin [ 16/Feb/12 ] | |||||||||||||||
|
When testing my fix, I discovered that the test above is a red herring: there's a different problem wherein chained $skips interact with each other weirdly, and get stuck. I fixed that by implementing DocumentSource::coalesce() for them, which optimizes them all by collapsing adjacent ones (adjacent skips become a single skip with the sum of the skip values). Once I did that, this script no longer took any time at all, and couldn't be used to reproduce the inability to interrupt aggregation pipelines. For the real problem, I used the following to reproduce the problem:
This takes long enough that you can catch it with db.currentOp(), and kill it with db.killOp(). Currently waiting for problems w/github to be resolved so I can push. | |||||||||||||||
| Comment by auto [ 15/Feb/12 ] | |||||||||||||||
|
Author: {u'login': u'cwestin', u'name': u'U-tellus\\cwestin', u'email': u'cwestin@10gen.com'}Message: checkpoint |