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

Benedict commented on CASSANDRA-8829:
-------------------------------------

That one looks good to me. Could probably represent it as !new 
HashSet<>(sstables).containsAll(prevSstables) to be marginally more efficient, 
or perhaps even expose referenceCount() and check Sets.intersection(new 
HashSet<>(Iterables.filter(sstables, (s) -> s.referenceCount() == 0), new 
HashSet<>(Iterables.filter(sstables, (s) -> s.referenceCount() == 
0)).isEmpty(), or any one of a handful of similar alternatives. But I'm pretty 
sanguine about the representation of that check.

> Add extra checks to catch SSTable ref counting bugs
> ---------------------------------------------------
>
>                 Key: CASSANDRA-8829
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8829
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Richard Low
>            Assignee: Richard Low
>             Fix For: 2.0.13, 2.1.4
>
>         Attachments: 8829-2.0.patch
>
>
> There have been some bad affects from ref counting bugs (see e.g. 
> CASSANDRA-7704). We should add extra checks so we can more easily diagnose 
> any future problems and avoid some of the side effects.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to