[SERVER-26452] `renameCollection` should handle write conflicts Created: 04/Oct/16 Updated: 27/Feb/23 Resolved: 29/Mar/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 3.3.12 |
| Fix Version/s: | 3.2.14, 3.4.7, 3.5.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samuel Rossi (Inactive) | Assignee: | Daniel Gottlieb (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | bkp | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v3.4, v3.2
|
||||||||||||||||
| Steps To Reproduce: | Unfortunately I don't have a small test case that reproduces the error, but a write conflict can be reproduced by running the `agg_match.js` FSM concurrency test with an increased write conflict activation probability: 1. Change `jstests/concurrency/fsm_all.js` to call `runWorkLoadsSerially` on an array only containing "jstests/concurrency/fsm_workloads/agg_match.js" (instead of `ls(dir)` 2. In the function `setupWorkload` in `jstests/concurrency/fsm_libs/runner.js`, add the line `assert.commandWorked(myDB.adminCommand({configureFailPoint: "WTWriteConflictException", mode: {activationProbability: 0.0005}}));` (right after the declaration of the variable `myDB`) |
||||||||||||||||
| Sprint: | Storage 2017-03-27, Storage 2017-04-17 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
renameCollection (in "src/mongo/db/catalog/rename_collection.cpp") does not currently handle write conflicts. To do this, a retry loop needs to be added to ensure that that command succeeds. |
| Comments |
| Comment by Githook User [ 28/Jun/17 ] |
|
Author: {u'username': u'dgottlieb', u'name': u'Daniel Gottlieb', u'email': u'daniel.gottlieb@10gen.com'}Message: Add a write conflict retry loop around the fast-path for renameCollection, Additionally, when indexes are being dropped, remove them from the Lastly, this patch separates out the WTWriteConflictException failpoint (cherry picked from commit bc1a7d9aa34f3c7e61f89afa481e677e4981437d) |
| Comment by Githook User [ 25/May/17 ] |
|
Author: {u'username': u'dgottlieb', u'name': u'Daniel Gottlieb', u'email': u'daniel.gottlieb@10gen.com'}Message: Add a write conflict retry loop around the fast-path for renameCollection, Additionally, when indexes are being dropped, remove them from the Lastly, this patch separates out the WTWriteConflictException failpoint (cherry picked from commit bc1a7d9aa34f3c7e61f89afa481e677e4981437d) |
| Comment by Githook User [ 29/Mar/17 ] |
|
Author: {u'username': u'dgottlieb', u'name': u'Daniel Gottlieb', u'email': u'daniel.gottlieb@10gen.com'}Message: Add a write conflict retry loop around the fast-path for renameCollection, Additionally, when indexes are being dropped, remove them from the Lastly, this patch separates out the WTWriteConflictException failpoint |