[SERVER-39835] Create interface to run delete and insert in transaction Created: 26/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 | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding 2019-03-11 |
| Participants: |
| Description |
|
In order to update a document's shard key value, we need to delete the old document and insert the new document. This should be done in an already running transaction. Implementation details:
This should be able to be used in both batch_write_exec.cpp and cluster_find_and_modify.cpp. We should also create unit tests for this logic as a part of this ticket. |
| Comments |
| Comment by Githook User [ 07/Mar/19 ] |
|
Author: {'name': 'jannaerin', 'username': 'jannaerin', 'email': 'golden.janna@gmail.com'}Message: Co-authored-by: BlakeIsBlake blake.oler@mongodb.com |
| Comment by Blake Oler [ 28/Feb/19 ] |
|
As part of this, we will need to add the post-image _id to the query predicate when we are doing the delete. |