[SERVER-49825] Replicate updates changing value under new shard key pattern as delete + insert in a transaction Created: 23/Jul/20  Updated: 29/Oct/23  Resolved: 06/Nov/20

Status: Closed
Project: Core Server
Component/s: Replication, Sharding, Write Ops
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Alexander Taskov (Inactive)
Resolution: Fixed Votes: 0
Labels: PM-234-M2, PM-234-T-oplog-fetch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-52974 Checking if destined recipient has ch... Closed
Related
related to SERVER-54040 Resharding may fail to throw WouldCha... Closed
related to SERVER-52620 Update resharding_replicate_updates_a... Closed
related to SERVER-52683 Relax restrictions for updates to new... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-10-19, Sharding 2020-11-02, Sharding 2020-11-16
Participants:
Linked BF Score: 0

 Description   

This is analogous to updates changing the value under the current shard key pattern. Taking inspiration from WouldChangeOwningShard, one option is to introduce a new WouldChangeOwningRecipientShard error code. update_stage.cpp would throw a WouldChangeOwningRecipientShard exception to have the operation be retried as a delete + insert in a transaction. The exception could be handled in service_entry_point_common.cpp rather than bubbling all the way back to mongos. This is because the document being modified is still owned by the donor shard. Note that the case for WouldChangeOwningShard should therefore be checked before the case for WouldChangeOwningRecipientShard.



 Comments   
Comment by Githook User [ 06/Nov/20 ]

Author:

{'name': 'Alex Taskov', 'email': 'alex.taskov@mongodb.com', 'username': 'alextaskov'}

Message: SERVER-49825 Replicate updates changing value under new shard key pattern as delete + insert in a transaction
Branch: master
https://github.com/mongodb/mongo/commit/6508f5d6ad5d514f433b660f0da7f513625973be

Generated at Thu Feb 08 05:20:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.