skorotkov commented on code in PR #10178:
URL: https://github.com/apache/ignite/pull/10178#discussion_r938101544
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRecoveryWithConcurrentRollbackTest.java:
##########
@@ -258,6 +259,110 @@ else if (g1Keys.contains(key))
assertEquals(s1, s2);
}
+
+ /**
+ * The test enforces the concurrent processing of the same prepared
transaction both in the
+ * tx recovery procedure started due to primary node left and in the tx
recovery request handler
+ * invoked by message from another backup node.
+ * <ul>
+ * <li>Start 3 nodes (g0, g1, g2) and cache with 2 backups.</li>
+ * <li>Prepare a transaction with g2 as a primary node.</li>
+ * <li>Kill g2.</li>
+ * <li>Enforce the concurrent processing of transaction in tx recovery on
g1.</li>
+ * </ul>
+ * Use several attempts to reproduce the race condition.
+ * <p>
+ * Expected result: transaction is finished both on g0 and g1
+ */
+ @Test
+ public void testRecoveryNotDeadLockOnPrimaryFail() throws Exception {
+ backups = 2;
+ persistence = false;
+
+ for (int iter = 0; iter < 75; iter++) {
Review Comment:
Return 100 for now since test looks faster a bit after rework.
Not sure how to make it more faster. Have any idea?
The test reproduces the very rare situation. Sometimes it tooks upto 93
iterations to fail on my laptop.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]