[SERVER-39780] Throw WouldChangeOwningShard exception if write will cause document to change shards Created: 22/Feb/19  Updated: 29/Oct/23  Resolved: 07/Mar/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.9

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-46811 multi=true updates can modify the sha... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2019-02-25, Sharding 2019-03-11
Participants:

 Description   

Before applying the post-image, the update node should check whether this node owns the chunk that the shard key in the post-image belongs to. If it does not own this chunk, it should throw WouldChangeOwningShard. If the write is in a multi-statement transaction, it should attach the original query predicate and post-image. If it is not, it should attach the original query predicate and update fields.



 Comments   
Comment by Githook User [ 07/Mar/19 ]

Author:

{'name': 'jannaerin', 'username': 'jannaerin', 'email': 'golden.janna@gmail.com'}

Message: SERVER-39780 Throw WouldChangeOwningShardException in update stage when node no longers owns doc
Branch: master
https://github.com/mongodb/mongo/commit/57c8a9b715ad2f36a2671e9b8ce9f85be177d7ba

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