[SERVER-1529] concurrency issues with yielding Created: 01/Aug/10 Updated: 12/Jul/16 Resolved: 02/Aug/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Concurrency |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.8 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Eliot Horowitz (Inactive) | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
see jstests/cursora.js this exhibits 3 different problems for me randomly:
|
| Comments |
| Comment by auto [ 02/Aug/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: enhance test for |
| Comment by auto [ 02/Aug/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: fix update/remove concurrency - centralize for query |
| Comment by Aaron Staple [ 01/Aug/10 ] |
|
There is a similar problem with deletes in 1.4 |
| Comment by Aaron Staple [ 01/Aug/10 ] |
|
So at first glance I think that in addition to query, it's necessary to do checkLocation after yielding in the implementations of update and delete as well as the query ops for update and delete, and also for count. And anywhere else we might be yielding |
| Comment by auto [ 01/Aug/10 ] |
|
Author: {'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}Message: |
| Comment by Eliot Horowitz (Inactive) [ 01/Aug/10 ] |
|
1) Ok - key node makes sense. 2) i'll work on cursor dropped 3) duh reassign back to me when you're done with #1 |
| Comment by Aaron Staple [ 01/Aug/10 ] |
|
The invalid key node is caused by checkLocation() being called for the cursor before deletion, but not after deletion (deletion may change the key offset within the btree bucket, but this is only known after deletion occurs). The quick fix is to call checkLocation() again after yielding, and I've done that.
I get the "cursor dropped during query" message during the eval query - you know what causes that. I think the not equal after remove problem is because the spawned shell is exiting before the remove operation completes on the server. I added a getLastError() to try and fix. |