cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7284) ClassCastException in HintedHandoffManager.pagingFinished
Date Thu, 22 May 2014 10:21:02 GMT


Sylvain Lebresne commented on CASSANDRA-7284:

I would argue that an instanceof check is less future proof. If we end up passing a composite
that is not empty and not a CellName in the future and we don't update that method, then an
instanceof would just silence what would possibly be a bug, making it hard to track (sure,
there is a chance a instanceof would be the right thing to do, but it might not be and I'm
not a betting man). If we do change the code so a non empty composite can be passed to this
method and this method is not updated, then getting a ClassCastException will make it very
easy to track what's wrong and we can use the right fix.

But well, I would live with an instanceof, I just don't think it's better.

> ClassCastException in HintedHandoffManager.pagingFinished
> ---------------------------------------------------------
>                 Key: CASSANDRA-7284
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Minor
>             Fix For: 2.1 rc1
>         Attachments: 7284-v2.txt, 7284.txt
> During a long running stress test on bdplab, Ryan encountered the following interesting
exception, which I think is an as yet unfiled bug. Looks to be a pretty simple issue, introduced
> {code}
> java.lang.ClassCastException: org.apache.cassandra.db.composites.Composites$EmptyComposite
cannot be cast to org.apache.cassandra.db.composites.CellName
> 	at org.apache.cassandra.db.HintedHandOffManager.pagingFinished(
> 	at org.apache.cassandra.db.HintedHandOffManager.doDeliverHintsToEndpoint(
> 	at org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpoint(
> 	at org.apache.cassandra.db.HintedHandOffManager.access$300(
> 	at org.apache.cassandra.db.HintedHandOffManager$
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker( ~[na:1.7.0_51]
> 	at java.util.concurrent.ThreadPoolExecutor$ ~[na:1.7.0_51]
> 	at ~[na:1.7.0_51]
> {code}

This message was sent by Atlassian JIRA

View raw message