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

Stefan Miklosovic edited comment on CASSANDRA-21665 at 9/21/26 11:02 AM:
-------------------------------------------------------------------------

there is failing multiplexer test (a test run repeatedly), (1), (2)

Basically these:

{code}
    org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testNonblockingShouldMaintainSteadyDiskUsage
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testCompletedFlag
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testSegmentFlaggingWithNonblockingOnCreation
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testSwitchingCDCWriteModes
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testCDCIndexFileWriteOnSync
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testReplayLogic
{code}

(1)  
https://app.circleci.com/pipelines/github/instaclustr/cassandra/6762/workflows/00f11ed7-7f89-48ef-b559-c9e2f5c3c99f
(2) 
https://app.circleci.com/pipelines/github/instaclustr/cassandra/6762/workflows/00f11ed7-7f89-48ef-b559-c9e2f5c3c99f/jobs/618402/tests


[~johnny15676] would you mind to take a look into this? I think it makes sense 
to harden these tests to not fail like that and merge it to 6.0 and trunk too. 
I am not saying that your change has caused the tests to fail (that might be 
also true but I can not say at the moment). I am saying that we have 
indentified these tests are flaky and we might act on it. 

I see you already kind of saw this when saying:

"Nothing gets lost, it just makes the wrong call for a moment, and it brings 
back the flaky CDC tests that CASSANDRA-18948 was fixing"

well ... I would be OK to merge that, yeah ... But it would be awesome to spend 
extra time on this when we are on it anyway. If the backlash is strong and 
other committers are OK with it and the test passes without multiplexer we can 
ship that.


was (Author: smiklosovic):
there is failing multiplexer test (a test run repeatedly), (1), (2)

Basically these:

{code}
    org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testNonblockingShouldMaintainSteadyDiskUsage
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testCompletedFlag
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testSegmentFlaggingWithNonblockingOnCreation
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testSwitchingCDCWriteModes
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testCDCIndexFileWriteOnSync
      org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest 
testReplayLogic
{code}

(1)  
https://app.circleci.com/pipelines/github/instaclustr/cassandra/6762/workflows/00f11ed7-7f89-48ef-b559-c9e2f5c3c99f
(2) 
https://app.circleci.com/pipelines/github/instaclustr/cassandra/6762/workflows/00f11ed7-7f89-48ef-b559-c9e2f5c3c99f/jobs/618402/tests


[~johnny15676] would you mind to take a look into this? I think it makes sense 
to harden these tests to not fail like that and merge it to 6.0 and trunk too. 
I am not saying that your change has caused the tests to fail (that might be 
also true but I can not say at the moment). I am saying that we have 
indentified these tests are flaky and we might act on it. 

> Restore volatile on CommitLogSegment.cdcState, lost in the cassandra-4.1 to 
> cassandra-5.0 merge
> -----------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21665
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Local/Commit Log
>            Reporter: Johnny Miller
>            Assignee: Johnny Miller
>            Priority: Low
>             Fix For: 5.0.x
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> While doing some research into the commit log code I came across something 
> that looks like it was dropped by mistake during a merge.
> CASSANDRA-18948 fixed flakiness in CommitLogSegmentManagerCDCTest by making 
> CommitLogSegment.cdcState volatile. That fix is present on cassandra-4.0 and 
> cassandra-4.1, and the 4.0 to 4.1 merge (6cac24f581) carried it correctly.
> The next merge up, f48de8343c "Merge branch 'cassandra-4.1' into 
> cassandra-5.0" on 2023-11-20, has the volatile on its 4.1 parent but resolved 
> CommitLogSegment.java without it.
> As a result every 5.0.x release ships "private CDCState cdcState = 
> CDCState.PERMITTED;" (CommitLogSegment.java, line 70 at current 5.0 HEAD) 
> while 4.0, 4.1, 6.0 and trunk all have the volatile.
> I think this would result in threads sometimes seeing an out of date CDC 
> state for a segment. So a CDC write could be rejected when there is actually 
> space, or let through when there is not, and the _cdc.idx file could be 
> written one sync later than it should. Nothing gets lost, it just makes the 
> wrong call for a moment, and it brings back the flaky CDC tests that 
> CASSANDRA-18948 was fixing. Happy to be told it is fine without it, but every 
> other branch has it, so it looks like a merge accident.
> The fix is the original one line, applied to cassandra-5.0 only; 
> cassandra-6.0 and trunk already carry the volatile.
> Patch to follow.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to