CASSANDRA-19987 - Add Direct IO support for compaction reads (DRAFT)
Status: draft for early review (by Ariel).
This work adds Direct IO support specifically for compaction reads of compressed tables. In its current state it should be easily extendable to be used by other bulk operations which would benefit from bypassing the page cache (and thus not polluting it).
It introduces the ability to perform SSTable scans using either the default open data file, or an ephemeral data file opened using DIO for the lifetime of the scan. This could be extended to use any alternative disk access mode in the future, if required.
Points of interest
- We currently check DIO capability per SSTableReader data file. Perhaps we can/need to be smarter and check per data file directory.
- FileHandle now supports toBuilder
Remaining work
- [ ] Compaction integration tests
- [x] Enhance Direct CompressedChunkReader tests
- [ ] Publish performance numbers
- [ ] Start-up verifications for DIO support (currently done per data file within an SSTableReader)
- [ ] StartupChecks for data file locations
patch by Sam Lightfoot; to be reviewed by Ariel Weisberg & Maxwell Guo for CASSANDRA-19987
https://issues.apache.org/jira/browse/CASSANDRA-19987