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

Berenguer Blasi commented on CASSANDRA-17422:
---------------------------------------------

I think the current PR changes the behavior of the test. Previously we were 
removing from the queue _while_ the lock acquired 
[here|https://github.com/apache/cassandra/pull/1777/files#diff-01005beb5774536671b8fed6d3f6b57c90d837257da7581ac12807c234140043R66]
 was being held, whereas in the new PR that is not the case iiuc.

But I have managed to repro locally with the repeatable runner, just adding to 
the test class:
{noformat}
@RunWith(RepeatableRunner.class)
@RepeatableRunnerConfiguration(iterations = 300000)
{noformat}

I have an alternative [PR|https://github.com/apache/cassandra/pull/1777/files#] 
which fixes the issue maintaining the original behavior. The explanation being 
the the call to get the lock the second time 
[here|https://github.com/apache/cassandra/pull/1777/files#diff-01005beb5774536671b8fed6d3f6b57c90d837257da7581ac12807c234140043R92]
 may return null if the autoclosable 
[here|https://github.com/apache/cassandra/pull/1777/files#diff-01005beb5774536671b8fed6d3f6b57c90d837257da7581ac12807c234140043R66]
 hasn't completed and released the lock in time. Adding a latch to catch that 
event fixes the test for me.

[PR 4.0|https://github.com/apache/cassandra/pull/1777/files#] and 
[CI|https://app.circleci.com/pipelines/github/bereng/cassandra/723/workflows/dbc40298-6c42-42af-8e4c-9d0c07d2e314/jobs/6507]
 + local repro of bug/fix

Wdyt makes sense? Do you want to create the 4.1, trunk PRs and test them 
locally or do you prefer I take over?

> Test Failure: org.apache.cassandra.net.OutboundMessageQueueTest.testRemove-cdc
> ------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17422
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17422
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/unit
>            Reporter: Josh McKenzie
>            Assignee: shylaja kokoori
>            Priority: Normal
>             Fix For: 4.0.x
>
>         Attachments: CASSANDRA-17422.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Branch: 4.0
> https://ci-cassandra.apache.org/job/Cassandra-4.0/350/testReport/org.apache.cassandra.net/OutboundMessageQueueTest/testRemove_cdc/
> {code}
> java.lang.NullPointerException
>       at 
> org.apache.cassandra.net.OutboundMessageQueueTest.testRemove(OutboundMessageQueueTest.java:91)
>       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)
> {code}
> Failure: 1 of 3



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to