[SERVER-36310] Unblacklist transactions from all jscore passthroughs that use replica sets Created: 26/Jul/18  Updated: 06/Dec/22  Resolved: 17/May/19

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

Type: Task Priority: Major - P3
Reporter: Judah Schvimer Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: ShardedTxn:Testing, prepare_optional, prepare_testing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-38631 Restore entire state of a session in ... Closed
Duplicate
is duplicated by SERVER-35659 Run transactions tests on kill/termin... Closed
Related
related to SERVER-39082 Retry on TransientTransaction errors ... Closed
related to SERVER-36311 Add stepdowns, shutdowns, and crashes... Closed
Assigned Teams:
Replication
Sprint: Sharding 2018-09-10
Participants:

 Description   

To do this we'll need to buffer operations in a transaction so we can retry the entire transaction if the transaction errors on failover.



 Comments   
Comment by Judah Schvimer [ 07/Feb/19 ]

Per team discussion, we are making this optional. Before closing this ticket we should see if there are any tests in core/txns/ that can be run in our non-txn_override.js stepdown, kill, or terminate suites as is, or with minimal changes to auto_retry_on_network_error.js.

Comment by Jack Mulrow [ 18/Jan/19 ]

Like I mentioned at the meeting last week, as far as I can tell most of the tests in core/txns seem to test the transaction API or edge cases, and since we already have suites dedicated to running them against different topologies (e.g. sharded_jscore_txns) and that run the more generic core tests wrapped in transactions with stepdowns/terminates/kills (as of SERVER-36311), I don't think this would give us much more coverage.

That said, I think an override that wraps these tests in a retry loop that only handles TransientTransaction errors would still be useful, since I've realized that there's nothing preventing one of these tests from failing with a transient error even without stepdowns, etc, which will lead to unnecessary BFs (like BF-11904). I filed SERVER-39082 to track adding just this functionality and made it a sharding waiting for bug fix day ticket, since the sharding passthroughs for core/txns are particularly likely to hit transient errors.

Comment by Judah Schvimer [ 17/Jan/19 ]

jack.mulrow and max.hirschhorn, please add any thoughts on how much added test coverage this would actually give us.

Comment by Judah Schvimer [ 02/Aug/18 ]

I agree with Max's proposal.

Comment by Max Hirschhorn [ 02/Aug/18 ]

There's some overlap here with SERVER-36311 that I've moved my original comment there. In order to accomplish the work in this ticket, we'd still need the same changes to the auto_retry_on_network_error.js override file.

We'd additionally need a new override file that handles commandObj and makeFuncArgs in the same way as described for the modifications to jstests/libs/txns/txn_override.js; however, it is made more complicated by how src/mongo/shell/session.js is responsible for filling in the txnNumber because the jstests/core/txns/ tests use the mongo shell APIs to run transactions themselves. The new override file would effectively need to learn of a new transaction by seeing a different txnNumber field in the commandObj argument compared to the commandObj from when it was called previously. It would also need to keep the underlying DriverSession in sync with the current transaction number to use as the runWithRetriesOnNetworkErrors() calling the overridden Mongo.prototype.runCommand() function of jstests/libs/txns/txn_override.js is incrementing the transaction number on its own.

I'd like to propose that we hold off on this ticket until SERVER-36311 is completed as we'll like be able to reuse some of "how to buffer operations inside of the same transaction" logic.

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