[SERVER-34004] Support commitTransaction and abortTransaction commands on secondaries Created: 20/Mar/18  Updated: 29/Oct/23  Resolved: 03/Apr/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Bug 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

Issue Links:
Depends
Duplicate
is duplicated by SERVER-33681 Test and document behavior of running... Closed
Related
is related to SERVER-34038 Make sure that commitTransaction wait... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2018-04-09
Participants:
Linked BF Score: 0

 Description   

For multi-statement read-only (autocommit:false) transactions, we need to be able to commit/abort them to clean up the associated resources.



 Comments   
Comment by Githook User [ 04/Apr/18 ]

Author:

{'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}

Message: SERVER-34004 Call awaitLastOpCommitted before reading from secondary in test
Branch: master
https://github.com/mongodb/mongo/commit/566526740cf7f6a0de6dd5df427d939ce89018ef

Comment by Githook User [ 03/Apr/18 ]

Author:

{'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}

Message: SERVER-34004 Support commit and abort transaction commands on secondaries
Branch: master
https://github.com/mongodb/mongo/commit/3bb0b814e36991e15fc7ac07776737a47b5d8c5e

Comment by Githook User [ 26/Mar/18 ]

Author:

{'email': 'shnhrv@gmail.com', 'name': 'Shane Harvey', 'username': 'ShaneHarvey'}

Message: Skip secondary abortTransaction test, blocked on SERVER-34004
Branch: master
https://github.com/mongodb/specifications/commit/57bb7de628334b4c03cede48887c95644da43f6d

Comment by Spencer Brody (Inactive) [ 21/Mar/18 ]

For 4.0 we could make the wait for write concern on read only transactions a no-op, and only start actually doing writeconcern waiting once we truly support speculative readConcern behavior.

Comment by Spencer Brody (Inactive) [ 21/Mar/18 ]

This should also support waiting for write concern, to support waiting for a read done at a 'speculative' readConcern to confirm that the results match the readConcern requested.

The initial version will wait for the current last applied optime to become committed. SERVER-34038 is filed to be smarter about picking the time to wait for, so we don't wait longer than is necessary.

Comment by Andy Schwerin [ 21/Mar/18 ]

The commit command should be able to accept and handle w:majority or w:1 write concern.

Generated at Thu Feb 08 04:35:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.