[SERVER-40386] Audit call sites of commitTransaction_forTesting() and abortTransaction_forTesting() to make sure they do not ignore server response Created: 29/Mar/19  Updated: 29/Oct/23  Resolved: 04/Jun/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.1.14, 4.2.0-rc1

Type: Improvement Priority: Major - P3
Reporter: Pavithra Vetriselvan Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-41127 TransactionRouter should not assert t... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Repl 2019-05-06, Repl 2019-06-03, Repl 2019-06-17
Participants:

 Description   

As a part of SERVER-36728, we replaced the abortTransaction() helper with abortTransaction_forTesting(), which does not ignore server errors. However, in a majority of our tests, we do not use the response.

We should either assert that the abort succeeded or that the command failed with NoSuchTransaction to account for transactions implicitly aborted by the server.

We should also make sure we aren't using commitTransaction() or abortTransaction() in our tests unintentionally.



 Comments   
Comment by Githook User [ 04/Jun/19 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-40386: replace commitTransaction() used in jstests with commitTransaction_forTesting()

(cherry picked from commit 603d97f23ff6836be5e325bf233524d977ea9d6d)
Branch: v4.2
https://github.com/mongodb/mongo/commit/aeb8148c54ed9799e87b833d0fa3ba456e2c6719

Comment by Githook User [ 04/Jun/19 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-40386: replace abortTransaction() used in jstests with abortTransaction_forTesting()

(cherry picked from commit f41d1675fcbfe3964f18b3fa529d4dbd84a1fc1e)
Branch: v4.2
https://github.com/mongodb/mongo/commit/84f1ba4d3302227fbee8f4b89b2c486dce59dbbc

Comment by Githook User [ 04/Jun/19 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-40386: replace commitTransaction() used in jstests with commitTransaction_forTesting()
Branch: master
https://github.com/mongodb/mongo/commit/603d97f23ff6836be5e325bf233524d977ea9d6d

Comment by Githook User [ 04/Jun/19 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-40386: replace abortTransaction() used in jstests with abortTransaction_forTesting()
Branch: master
https://github.com/mongodb/mongo/commit/f41d1675fcbfe3964f18b3fa529d4dbd84a1fc1e

Comment by Githook User [ 02/Jun/19 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-40386: assert responses of abortTransaction_forTesting() and commitTransaction_forTesting()
Branch: master
https://github.com/mongodb/mongo/commit/c9fa616db03de737c44340f33a44863072a0955d

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