[ 
https://issues.apache.org/jira/browse/CASSANDRA-16526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17311021#comment-17311021
 ] 

Yifan Cai commented on CASSANDRA-16526:
---------------------------------------

The approach is sensible.

+1

It is very hard to reproduce. I have loop'd the test for over 100 times but 
still failed to reproduce.

There is a shared {{QueueFileShrinkManager}} in the chronicle queue internal. 
Whenever the file rolls to the next cycle, it schedules an async shrinking task 
that often runs after the test is finished. Maybe it has something to do with 
the failed test. (I have not looked deep into it.) It is probably worthy to 
make the shrink task synchronized to run it as part of the test. However, with 
the change proposed, I need to increase the sleep time in the 
{{testTrucationReleasesLogSpace}} from 2 seconds to 4 seconds.

> BinLogTest is flaky
> -------------------
>
>                 Key: CASSANDRA-16526
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16526
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/unit
>            Reporter: Brandon Williams
>            Assignee: Brandon Williams
>            Priority: Normal
>             Fix For: 4.0-rc
>
>
> Probably due to increasing the runners:
> {noformat}
> java.lang.RuntimeException: java.lang.IllegalStateException: Expected file to 
> exist for cycle: 1616021848, file: 
> /home/jenkins/jenkins-slave/workspace/Cassandra-devbranch-test-compression/jdk/jdk_11_latest/label/cassandra/tmp/foo17bar/20210317-225728T.cq4.
> minCycle: 1616021850, maxCycle: 1616021852
> Available files: [20210317-225730T.cq4, 20210317-225732T.cq4]
>       at 
> org.apache.cassandra.utils.binlog.BinLogTest.readBinLogRecords(BinLogTest.java:492)
>       at 
> org.apache.cassandra.utils.binlog.BinLogTest.lambda$testTrucationReleasesLogSpace$8(BinLogTest.java:444)
>       at org.apache.cassandra.Util.spinAssertEquals(Util.java:605)
>       at org.apache.cassandra.Util.spinAssertEquals(Util.java:595)
>       at 
> org.apache.cassandra.utils.binlog.BinLogTest.testTrucationReleasesLogSpace(BinLogTest.java:444)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> Caused by: java.lang.IllegalStateException: Expected file to exist for cycle: 
> 1616021848, file: 
> /home/jenkins/jenkins-slave/workspace/Cassandra-devbranch-test-compression/jdk/jdk_11_latest/label/cassandra/tmp/foo17bar/20210317-225728T.cq4.
> minCycle: 1616021850, maxCycle: 1616021852
> Available files: [20210317-225730T.cq4, 20210317-225732T.cq4]
>       at 
> net.openhft.chronicle.queue.impl.single.SingleChronicleQueue$StoreSupplier.nextCycle(SingleChronicleQueue.java:1157)
>       at 
> net.openhft.chronicle.queue.impl.WireStorePool.nextCycle(WireStorePool.java:66)
>       at 
> net.openhft.chronicle.queue.impl.single.SingleChronicleQueue.nextCycle(SingleChronicleQueue.java:507)
>       at 
> net.openhft.chronicle.queue.impl.single.StoreTailer.nextIndexWithNextAvailableCycle(StoreTailer.java:507)
>       at 
> net.openhft.chronicle.queue.impl.single.StoreTailer.endOfCycle(StoreTailer.java:323)
>       at 
> net.openhft.chronicle.queue.impl.single.StoreTailer.next0(StoreTailer.java:295)
>       at 
> net.openhft.chronicle.queue.impl.single.StoreTailer.readingDocument(StoreTailer.java:202)
>       at 
> net.openhft.chronicle.queue.impl.single.StoreTailer.readDocument(StoreTailer.java:108)
>       at 
> org.apache.cassandra.utils.binlog.BinLogTest.readBinLogRecords(BinLogTest.java:481)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to