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

Kevin Gallardo commented on CASSANDRA-15543:
--------------------------------------------

{{RequestFailureException}} uses the map's size to find out the number of 
entries in it:

{code}
protected RequestFailureException(ExceptionCode code, ConsistencyLevel 
consistency, int received, int blockFor, Map<InetAddressAndPort, 
RequestFailureReason> failureReasonByEndpoint)
    {
        super(code, String.format("Operation failed - received %d responses and 
%d failures: %s",
                                  received,
                                  failureReasonByEndpoint.size(),
                                  buildFailureString(failureReasonByEndpoint)));
{code}

It does a copy of the map later in the constructor but I suppose there is still 
a chance the content of the map may be different between the call to {{size()}} 
and the entries when iterated in {{buildFailureString()}}.

> flaky test 
> org.apache.cassandra.distributed.test.SimpleReadWriteTest.readWithSchemaDisagreement
> -----------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15543
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15543
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest
>            Reporter: David Capwell
>            Assignee: Kevin Gallardo
>            Priority: Normal
>             Fix For: 4.0-alpha
>
>
> This fails infrequently, last seen failure was on java 8
> {code}
> junit.framework.AssertionFailedError
>       at 
> org.apache.cassandra.distributed.test.DistributedReadWritePathTest.readWithSchemaDisagreement(DistributedReadWritePathTest.java:276)
> {code}



--
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