Maxwell-Guo commented on code in PR #2777:
URL: https://github.com/apache/cassandra/pull/2777#discussion_r1361989241
##########
src/java/org/apache/cassandra/db/commitlog/CommitLog.java:
##########
@@ -684,5 +713,32 @@ public EncryptionContext getEncryptionContext()
{
return encryptionContext;
}
+
+ /**
+ * Returns Direct-IO/non-buffer used for CommitLog IO.
+ * @return Direct-IO used for CommitLog IO
+ */
+ public boolean isDirectIOEnabled()
+ {
+ return diskAccessMode == Config.CommitLogDiskAccessMode.direct_io;
+ }
+
+ /**
+ * Returns MMAP used for CommitLog IO.
+ * @return MMAP used for CommitLog IO
+ */
+ public boolean isMMAPEnabled()
+ {
+ return diskAccessMode == Config.CommitLogDiskAccessMode.mmap;
+ }
+
+ /**
+ * Returns Standard or buffered I/O used for CommitLog IO.
+ * @return Standard or buffered I/O used for CommitLog IO
+ */
+ public boolean isBufferedIOEnabled()
+ {
+ return diskAccessMode == Config.CommitLogDiskAccessMode.standard;
+ }
Review Comment:
So what about rename to isStandardModeEnable() ?
It seems that there is a little gap between standard and bufferIo, it may
need to take some time for you to explain that .
But in my mind , the code should and could explain by itself if you rename
to isStandardModeEnable.
--
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]