Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
Description
Now that we have a few uses of compression/decompression on ByteBuffers it is time to finalize the interface before it becomes set in stone with 2.2. The current code has some shortcomings:
- The interface uses the buffers' positions and limits instead of accepting offset and length as parameters. This necessitates that the buffers be duplicated before they can be compressed for thread-safety, something that adds burden to the caller, is prone to being forgotten, and we could generally do without for performance.
- The direct/non-direct buffer support needs to be more clearly defined. The current useDirectOutputByteBuffers is not named well.
- If we don't want to support non-direct buffers everywhere as a fallback, we should clearly state the decision and rationale.
- How should WrappedByteBuffer treat direct/indirect buffers?
- More testing is necessary as e.g. errors in DeflateCompressor were only caught in
CASSANDRA-6809.
Attachments
Attachments
Issue Links
- relates to
-
CASSANDRA-8464 Support direct buffer decompression for reads
- Resolved
-
CASSANDRA-8709 Convert SequentialWriter from using RandomAccessFile to nio channel
- Resolved
-
CASSANDRA-6809 Compressed Commit Log
- Resolved