[SERVER-39836] Allow updates to shard key value if the doc changes shards if the update is part of a multi-stmt txn Created: 26/Feb/19 Updated: 29/Oct/23 Resolved: 20/Mar/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.10 |
| 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: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Sharding 2019-03-25 | ||||||||
| Participants: | |||||||||
| Description |
|
If an update to a document's shard key value will cause the document to change shards, we throw a WouldChangeOwningShard exception. This ticket is to handle this error for updates sent as a part of a multi-statement transaction. In order to do this, we need to catch and re-throw this error in ServiceEntryPointCommon. In BatchWriteExec::executeBatch(), we should not abort the transaction on this error. Instead, we should run the delete-insert transaction created as part of If the update is not a part of a multi-stmt txn, we will error. |
| Comments |
| Comment by Githook User [ 20/Mar/19 ] |
|
Author: {'name': 'jannaerin', 'username': 'jannaerin', 'email': 'golden.janna@gmail.com'}Message: |