[SERVER-33591] Cleanup interaction of write concerns and transactions Created: 01/Mar/18 Updated: 29/Oct/23 Resolved: 15/Mar/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: | Siyuan Zhou | Assignee: | Siyuan Zhou |
| 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 2018-03-26 | ||||||||
| Participants: | |||||||||
| Description |
|
Due to We need to wait for write concern after committing the WUOW for commitTransaction and abortTransaction commands and disable or ignore write concerns for writes in a transaction. |
| Comments |
| Comment by Githook User [ 15/Mar/18 ] |
|
Author: {'email': 'siyuan.zhou@mongodb.com', 'name': 'Siyuan Zhou', 'username': 'visualzhou'}Message: |
| Comment by Siyuan Zhou [ 06/Mar/18 ] |
|
To make sure writeForWriteConcern can never be called inside the global WUOW, we need to push down the stashing logic as discussed with james.wahlin before his vacation. commitTransaction will commit the WUOW and transaction abort for whatever reason will leave the WUOW to the destructor, but we will stash the WUOW if any non-abort error is thrown, e.g. parsing errors. In the error cases, we generally allow clients to wait for writeConcern. Thus it makes more sense to make the writeForWriteConcern orthogonal to transaction by waiting outside the global WUOW. |
| Comment by Siyuan Zhou [ 02/Mar/18 ] |
|
spencer, as mentioned in the description, waitForWaitConcern is called inside a WUOW and hits an invariant in transaction. |
| Comment by Spencer Brody (Inactive) [ 02/Mar/18 ] |
|
Is there anything to do to support writeConcern on commitTransaction? I'd expect it to just work after |
| Comment by Siyuan Zhou [ 02/Mar/18 ] |
|
spencer, this ticket is also for supporting write concern of commitTransaction, which isn't covered by |