[SERVER-39118] Mongos should not blindly pass 'hasWriteConcernError=false' to getErrorLabels Created: 22/Jan/19 Updated: 29/Oct/23 Resolved: 27/Feb/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: | Esha Maharishi (Inactive) | Assignee: | Randolph Tan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | ShardedTxn:RouterSupport | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding 2019-01-28, Sharding 2019-02-11, Sharding 2019-02-25, Sharding 2019-03-11 |
| Participants: |
| Description |
|
At the very least, if commitTransaction is sent to a recovery router, the recovery router could target a stale coordinator primary and get back NoSuchTransaction for coordinateCommitTransaction with a writeConcern error. The recovery router should not attach TransientTransactionError in this case, since the transaction may have committed. |
| Comments |
| Comment by Githook User [ 27/Feb/19 ] |
|
Author: {'name': 'Randolph Tan', 'username': 'renctan', 'email': 'randolph@10gen.com'}Message: |
| Comment by Esha Maharishi (Inactive) [ 24/Jan/19 ] |
|
Given that 1) commitTransaction on mongos just forwards the shard's response back to the client, which means getErrorLabels, which is called in a catch block, won't get called, and 2) commitTransaction on mongod and, as of the issue in the ticket description shouldn't occur. I don't think writeConcern can be sent for regular transaction statements (besides commit/abort), so this may not be an issue... though perhaps worth a comment at the call site since it looks weird? |
| Comment by Gregory McKeon (Inactive) [ 22/Jan/19 ] |
|
renctan to talk to Siyuan about this. |