Maxwell-Guo commented on code in PR #4178:
URL: https://github.com/apache/cassandra/pull/4178#discussion_r2757909410
##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -1763,7 +1780,7 @@ private static Pair<DiskAccessMode, Boolean>
resolveCommitLogWriteDiskAccessMode
File commitLogLocationDir = new File(commitLogLocation);
PathUtils.createDirectoriesIfNotExists(commitLogLocationDir.toPath());
- directIOSupported =
FileUtils.getBlockSize(commitLogLocationDir) > 0;
+ directIOSupported =
FileUtils.isDirectIOSupported(commitLogLocationDir);
Review Comment:
I remembered that FileUtils#getBlockSize create a tmp file under commitlog
dir(also delete) to see if commitlog dir support direct io
Is there some possibility that data file and commitlog file are of different
filesystem ?
if FileUtils.isDirectIOSupported(commitLogLocationDir) return true can only
gurantee commitlog disk support direct io.
We used to make commitlog disk and data dir under different disk. cc
@aweisberg
--
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]