[ https://issues.apache.org/jira/browse/CASSANDRA-8707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14303145#comment-14303145 ]
Benedict commented on CASSANDRA-8707: ------------------------------------- OK, I've force pushed a version with comments in a directly proceeding commit to the introduction of that refactor. Let me know if it is still insufficient. It is _possible_ we could simplify by not distinguishing between the global and per-descriptor-type state. We could, for instance, only support getCurrentReplacement() for like-types, and only persist read meter stats for FINAL files. The only thing that would not be explicitly wrong would be the dropping of the page cache, which might happen prematurely. The reason I like the separation, however, is that it directly maps onto the actual lifecycles, so (excepting the initial acclimation) there is a lower cognitive burden for understanding how and when cleanup occurs; and there are no caveats to the other pieces of state and where you can use them. My current view is there is too much special casing going on, and it's introducing bugs, so I want to move to abstractions that map as closely to use as possible. > Move SegmentedFile, IndexSummary and BloomFilter to utilising RefCounted > ------------------------------------------------------------------------ > > Key: CASSANDRA-8707 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8707 > Project: Cassandra > Issue Type: Bug > Reporter: Benedict > Assignee: Benedict > Fix For: 2.1.3 > > > There are still a few bugs with resource management, especially around > SSTableReader cleanup, esp. when intermixing with compaction. This migration > should help. We can simultaneously "simplify" the logic in SSTableReader to > not track the replacement chain, only to take a new reference to each of the > underlying resources. -- This message was sent by Atlassian JIRA (v6.3.4#6332)