Skip to content

Commit 1f3490c

Browse files
jknidriftx
authored andcommitted
CNDB-14683: Cherry-pick fix for flaky LogTransactionTest (#1870)
### What is the issue This test is flaky. It stresses the log transaction framework by intentionally creating a race between transaction file cleanup and the listing of temporary files. It sometimes throws an exception during canonicalization of a file that has been removed, but this canonicalization is being done by the testing code, not the transaction code, and it does not indicate misbehavior by the log transaction. ### What does this PR fix and why was it fixed Cherry-picks the fix for this in newer apache/cassandra releases. This ignores exceptions due to files not being found during canonicalization. original patch authored by Jon Meredith, reviewed by Josh McKenzie for CASSANDRA-17286
1 parent 44f9087 commit 1f3490c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ static Set<File> listFiles(File folder, Directories.OnTxnErr onTxnErr, Directori
15351535
return ILogTransactionsFactory.instance.createLogAwareFileLister()
15361536
.list(folder.toPath(), (file, type) -> match.contains(type), onTxnErr)
15371537
.stream()
1538-
.map(File::toCanonical)
1538+
.flatMap(LogTransactionTest::toCanonicalIgnoringNotFound)
15391539
.collect(Collectors.toSet());
15401540
}
15411541

0 commit comments

Comments
 (0)