[SERVER-34051] Require autocommit:false on all operations as part of an ongoing transaction Created: 21/Mar/18 Updated: 29/Oct/23 Resolved: 04/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.4 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | William Schultz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Repl 2018-04-09 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
This is necessary to distinguish individual operations within an ongoing transaction from single-statement retryable writes |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 05/Apr/18 ] |
|
OK, that could be true - the driver ignores errors from abortTransaction so I didn't understand what was happening. In that case I'm alright with requiring autocommit: false for both. shane.harvey what do you think? I expect you agree. spencer could you please update your "Design: Single Replica Set Transactions" doc with the new protocol? |
| Comment by William Schultz (Inactive) [ 05/Apr/18 ] |
|
Um, that doesn't sound correct. Both commitTransaction and abortTransaction MUST have autocommit:false set in order to succeed. See repro for abortTransaction. abort_txn.js |
| Comment by A. Jesse Jiryu Davis [ 05/Apr/18 ] |
|
It appears that abortTransaction neither requires nor prohibits autocommit: false but commitTransaction requires it: "Must specify autocommit=false on all operations of a multi-statement transaction", error code 72. I propose that commitTransaction also shouldn't require or prohibit autocommit: false. |
| Comment by William Schultz (Inactive) [ 04/Apr/18 ] |
|
Ah, you are so right. That's my bad. I have gotten so used to clicking "Not Needed". Thanks for fixing it. |
| Comment by Githook User [ 04/Apr/18 ] |
|
Author: {'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}Message: This patch requires all operations that are part of a multi-statement transaction to |
| Comment by Spencer Brody (Inactive) [ 23/Mar/18 ] |
|
As part of this, if a command is received with autocommit:false, without 'startTransaction', and there is no matching transactionId in the server, we should return a NoSuchTransaction error |