[SERVER-35417] Concurrency workloads using transactions should use autoRetry for reads and writes Created: 05/Jun/18  Updated: 29/Oct/23  Resolved: 06/Jun/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.0.0-rc5, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Jonathan Abrahams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-34826 Write targeted FSM workload for read ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: TIG 2018-06-18
Participants:

 Description   

The Concurrency workloads which test transactions, should use an auto retry for both reads and writes:

  • jstests/concurrency/fsm_workloads/multi_statement_transaction_atomicity_isolation.js
  • jstests/concurrency/fsm_workloads/multi_statement_transaction_simple.js

The current function withTxnAndAutoRetryOnWriteConflict should be renamed to withTxnAndAutoRetry and only handle Transiet errors:

            try {
                func();
 
                // commitTransaction() calls assert.commandWorked(), which may fail with a
                // WriteConflict error response. We therefore suppress its doassert() output.
                quietly(() => session.commitTransaction());
            } catch (e) {
                if (!e.hasOwnProperty('errorLabels') ||
                    !e.errorLabels.includes('TransientTransactionError')) {
                    throw e;
                }
            ...
            }



 Comments   
Comment by Githook User [ 07/Jun/18 ]

Author:

{'username': 'hptabster', 'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com'}

Message: SERVER-35417 Concurrency workloads using transactions should use autoRetry for reads and writes

(cherry picked from commit 1b4b21a148c0a849693f5d3fcb18611893811e5e)
Branch: v4.0
https://github.com/mongodb/mongo/commit/36fc41541c527dfdeda968303535d04d59e4e53c

Comment by Githook User [ 06/Jun/18 ]

Author:

{'username': 'hptabster', 'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com'}

Message: SERVER-35417 Concurrency workloads using transactions should use autoRetry for reads and writes
Branch: master
https://github.com/mongodb/mongo/commit/1b4b21a148c0a849693f5d3fcb18611893811e5e

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