[SERVER-46194] Applying transfer mods in a migration does not handle write conflicts Created: 14/Feb/20 Updated: 29/Oct/23 Resolved: 23/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.2.9, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | Assignee: | Alexander Taskov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-4.4-stabilization | ||
| 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, v4.2
|
||||||||
| Sprint: | Sharding 2020-03-23, Sharding 2020-04-06 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 24 | ||||||||
| Description |
|
After cloning the initial documents in a chunk range, the recipient in a migration fetches any new writes in the range from the donor and applies them locally. For new inserts and updates, the recipient uses Helpers::upsert(), without handling write conflict exceptions, so a concurrent write to an already cloned document may abort the migration. This can happen in normal operation because multi writes targeted without the shard key are broadcast to all shards and do not filter orphans. I haven't reproduced this with transferred deletes, but from code inspection, the same problem seems possible. |
| Comments |
| Comment by Githook User [ 30/Jul/20 ] |
|
Author: {'name': 'Alex Taskov', 'email': 'alex.taskov@mongodb.com', 'username': 'alextaskov'}Message: (cherry picked from commit 7dbcb6b464eaedb4061d5e470313d9bae21ff03d) |
| Comment by Matthew Saltz (Inactive) [ 23/Jul/20 ] |
|
Requesting backport due to failure in a multiversion test suite with a migration from a 4.4 node to a 4.2 node |
| Comment by Githook User [ 25/Mar/20 ] |
|
Author: {'email': 'alex.taskov@mongodb.com', 'name': 'Alex Taskov', 'username': 'alextaskov'}Message: (cherry picked from commit 7dbcb6b464eaedb4061d5e470313d9bae21ff03d) |
| Comment by Githook User [ 23/Mar/20 ] |
|
Author: {'name': 'Alex Taskov', 'username': 'alextaskov', 'email': 'alex.taskov@mongodb.com'}Message: |