[SERVER-31288] findAndModify using a sorting will fail when done concurrently Created: 27/Sep/17 Updated: 07/Nov/17 Resolved: 02/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Concurrency, Querying |
| Affects Version/s: | 3.2.16 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ori Popowski | Assignee: | Mark Agarunov |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
Steps:
After the application is ran, the output will look something like this:
Every line that looks like this:
means a failure in updating. When we remove the sorting, all the updates will succeed. |
|||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
When there are multiple {{findAndModify}}s being ran on the same time with sort, about 50% of them will fail. |
| Comments |
| Comment by Mark Agarunov [ 02/Oct/17 ] |
|
Hello oripwk, After looking into this, I believe it may be due to the same underlying issue reported in As this has been fixed in more recent versions, my recommendation would be to upgrade to the the latest version of mongodb 3.4 if possible. As this is due to the same issue as Thanks, |
| Comment by Kelsey Schubert [ 02/Oct/17 ] |
|
Hi oripwk, Thank you for reporting this behavior. Would you please clarify whether you're using WiredTiger or MMAPv1 in your tests? We're investigating and will update this ticket when we know more. Kind regards, |