[SERVER-55012] renameBetweenDBs needs to always reposition its cursor in the event of a writeConflict Created: 05/Mar/21 Updated: 29/Oct/23 Resolved: 22/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.4.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.4
|
||||||||
| Sprint: | Execution Team 2021-03-22, Execution Team 2021-04-05 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 135 | ||||||||
| Description |
|
renameBetweenDBs has WriteConflictException handling that repositions (using seekExact) the cursor on the source collection if the RecordID of the beginning of the batch does not match the last observed RecordId. This is correct in most cases, but not if the writeConflict is observed on the first document of the batch. In this case the cursor on the source collection will invalidated, but not repositioned. Subsequent calls to next() will start over from the beginning. This can result in erroneously copying the same data from a source collection into the destination. |
| Comments |
| Comment by Githook User [ 10/May/21 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commit fd0d1ee222726959b7b211c614e92be903b13a54) |
| Comment by Githook User [ 22/Mar/21 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |