-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
v4.4
-
Sharding 2020-10-19
-
0
The PersistCommitDecisionWhenNoDocumentForTransactionExistsCanBeInterruptedAndReturnsError test case fails due to decision being persistent before txn::AsyncWorkScheduler is shut down.
Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
diff --git a/src/mongo/db/s/transaction_coordinator_test.cpp b/src/mongo/db/s/transaction_coordinator_test.cpp index e7426e97de..d962ffb622 100644 --- a/src/mongo/db/s/transaction_coordinator_test.cpp +++ b/src/mongo/db/s/transaction_coordinator_test.cpp @@ -724,6 +724,7 @@ TEST_F(TransactionCoordinatorDriverPersistenceTest, decision.setCommitTimestamp(_commitTimestamp); return decision; }()); + sleepmillis(500); _aws->shutdown({ErrorCodes::TransactionCoordinatorSteppingDown, "Shutdown for test"}); ASSERT_THROWS_CODE(
{"t":{"$date":"2020-10-15T19:28:25.165Z"},"s":"I", "c":"TEST", "id":4680100, "ctx":"main","msg":"FAIL","attr":{"test":"PersistCommitDecisionWhenNoDocumentForTransactionExistsCanBeInterruptedAndReturnsError","type":"TestAssertionFailureException","error":"Expected expression future.get() to throw AssertionException but it threw nothing. @src/mongo/db/s/transaction_coordinator_test.cpp:731"
- is related to
-
SERVER-41189 Make transaction coordinator retry persisting the decision on all errors except TransactionCoordinatorSteppingDown
- Closed