[SERVER-38850] Perform noop write before returning NoSuchTransaction error Created: 04/Jan/19 Updated: 29/Oct/23 Resolved: 16/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.7 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | Tess Avitabile (Inactive) |
| 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: | Repl 2019-01-14, Repl 2019-01-28 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 11 | ||||||||||||||||
| Description |
|
If a command returns a NoSuchTransaction error and there was a write concern provided on the command, perform a noop write before waiting for write concern. This ensures that if the command was run with write concern w:majority, and the write concern succeeds, then it is safe to attach the TransientTransactionError label. That is, it is safe for the driver/application to retry the entire transaction, since the node is primary, so the transaction cannot have committed on a newer primary. Since secondaries reject all commands with write concern, we will not attempt to perform the noop write on secondaries. This ticket must resolve all TODOs for |
| Comments |
| Comment by Githook User [ 16/Jan/19 ] | ||
|
Author: {'username': 'tessavitabile', 'email': 'tess.avitabile@mongodb.com', 'name': 'Tess Avitabile'}Message: | ||
| Comment by Tess Avitabile (Inactive) [ 15/Jan/19 ] | ||
|
shane.harvey, yes, we would see the error code NoSuchTransaction and a writeConcernError. Note that this is already the case after | ||
| Comment by Shane Harvey [ 14/Jan/19 ] | ||
|
One question here. Normally a command waits for write concern after it has succeeded on the primary. If the write concern fails the response will indicate the command succeeded with a "writeConcernError" field, like this:
In this ticket however, the server waits for write concern after a failed command. So what will the final response be when the write concern also fails? This?
| ||
| Comment by Tess Avitabile (Inactive) [ 14/Jan/19 ] | ||
|
This ticket will not resolve TODOs for |