[ https://issues.apache.org/jira/browse/CASSANDRA-8707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14308989#comment-14308989 ]
Marcus Eriksson edited comment on CASSANDRA-8707 at 2/6/15 11:21 AM: --------------------------------------------------------------------- I think the penny has finally dropped for me, the thing I'm missing now is more "why?"-comments, for example, why do we need to copy CompressionMetadata in CM.Writer#open(..) if finish type is final and not otherwise? In general, more "why?"-comments than "what?" would be helpful, at least around the tricky parts, I think future readers will appreciate that. Also, I think we need some high level documentation with concrete examples about the life cycle of sstables. I think this part of the code would be much simpler to maintain with a description of why and when the different cases occur. So, I'm +1 once we have some documentation (perhaps as a big comment on top in SSTableReader?), and a bit of a tweak to the current code comments to focus more on why we do certain things. was (Author: krummas): I think the penny has finally dropped, the thing I'm missing now is more "why?"-comments, for example, why do we need to copy CompressionMetadata in CM.Writer#open(..) if finish type is final and not otherwise? In general, more "why?"-comments than "what?" would be helpful, at least around the tricky parts, I think future readers will appreciate that. Also, I think we need some high level documentation with concrete examples about the life cycle of sstables. I think this part of the code would be much simpler to maintain with a description of why and when the different cases occur. So, I'm +1 once we have some documentation (perhaps as a big comment on top in SSTableReader?), and a bit of a tweak to the current code comments to focus more on why we do certain things. > 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 > Priority: Critical > 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)