smiklosovic commented on code in PR #2777:
URL: https://github.com/apache/cassandra/pull/2777#discussion_r1391344928
##########
src/java/org/apache/cassandra/db/commitlog/AbstractCommitLogSegmentManager.java:
##########
@@ -111,12 +111,20 @@ void start()
{
// For encrypted segments we want to keep the compression buffers
on-heap as we need those bytes for encryption,
// and we want to avoid copying from off-heap (compression buffer) to
on-heap encryption APIs
- BufferType bufferType = commitLog.configuration.useEncryption() ||
!commitLog.configuration.useCompression()
- ? BufferType.ON_HEAP
- :
commitLog.configuration.getCompressor().preferredBufferType();
+ BufferType bufferType = commitLog.configuration.isDirectIOEnabled()
Review Comment:
wow to read this is quite a challenge! Could you rewrite this somehow with
if / else?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]