blambov commented on code in PR #3477:
URL: https://github.com/apache/cassandra/pull/3477#discussion_r1716630662


##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -1459,20 +1461,23 @@ public static void applyPartitioner(Config conf)
         partitionerName = partitioner.getClass().getCanonicalName();
     }
 
-    private static DiskAccessMode 
resolveCommitLogWriteDiskAccessMode(DiskAccessMode providedDiskAccessMode)
+    private static Pair<DiskAccessMode, Boolean> 
resolveCommitLogWriteDiskAccessMode(DiskAccessMode providedDiskAccessMode)
     {
         boolean compressOrEncrypt = getCommitLogCompression() != null || 
(getEncryptionContext() != null && getEncryptionContext().isEnabled());
         boolean directIOSupported = false;
         try
         {
-            String commitLogLocation = getCommitLogLocation();
+            if (COMMITLOG_DIRECTIO_SUPPORT_FOR_TEST.getBoolean())

Review Comment:
   We shouldn't introduce changes in the logic for tests. We can achieve this 
with Byteman, by adding a rule to return 0 for `FileUtils.getBlockSize`. See 
for example 
[CompactionsBytemanTest](https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsBytemanTest.java).



-- 
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]

Reply via email to