[SERVER-37230] Ensure shards delete their TransactionCoordinator when restarting at the active transaction number Created: 20/Sep/18 Updated: 15/Oct/18 Resolved: 15/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | Assignee: | Matthew Saltz (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | ShardedTxn:DistributedCommit | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Sprint: | Sharding 2018-10-22 | ||||||||
| Participants: | |||||||||
| Description |
|
A shard may be chosen as the coordinator by mongos when it is executing a statement in a transaction, but if the targeting round fails, mongos will clear its tracking state and may pick a different shard as the coordinator when it retries. If a shard created a coordinator and then has its transaction restarted by the retry attempt (i.e. receives a request with startTransaction=true at the active transaction number), we should ensure its TransactionCoordinator object was removed. |
| Comments |
| Comment by Matthew Saltz (Inactive) [ 20/Sep/18 ] |
|
I think we get this for free. The coordinator on the original node will never receive coordinateCommit (or any votes), so when the commit deadline is reached it'll do "tryAbort" which will sendAbort to all participants it knows about (which are none) and then the coordinator will move to aborted state and then get removed from the catalog. |
| Comment by Esha Maharishi (Inactive) [ 20/Sep/18 ] |