Details
-
Improvement
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
Description
To slightly improve CASSANDRA-6916, and because it's a bit of a simplification anyway, we should move to ensuring sstable resources remain around during reads by guarding them with an OpOrder (which is also being introduced for CASSANDRA-6694) instead of using markReferenced()/release.
Note this does not eliminate markReferenced, as for long running processes such as compaction it makes sense to have an independent mechanism, because these long running processes would prevent all resource cleanup for their duration rather than just the resources they're using.
All this does is cleanup and slightly optimise the read path, whilst giving better guarantees about resource cleanup (e.g. page cache dropping of old sstables which may have been replaced multiple times since the reader was created, so we are dropping pages we don't realise are still in use - in real terms it should be very rare for such a reader to outlive multiple replacements and this is only a performance issue, not a matter of correctness, but it's nice to absolutely be certain anyway).
Attachments
Issue Links
- depends upon
-
CASSANDRA-6912 SSTableReader.isReplaced does not allow for safe resource cleanup
- Resolved
-
CASSANDRA-6689 Partially Off Heap Memtables
- Resolved