Maxwell-Guo commented on code in PR #2777:
URL: https://github.com/apache/cassandra/pull/2777#discussion_r1362091455
##########
src/java/org/apache/cassandra/db/commitlog/CommitLog.java:
##########
@@ -129,6 +131,25 @@ private static CommitLog construct()
// register metrics
metrics.attach(executor, segmentManager);
+
+ String diskMode = " ";
+
+ switch (DatabaseDescriptor.getCommitLogDiskAccessMode())
+ {
+ case standard:
+ diskMode = "Standard (buffered)";
+ break;
+ case mmap:
+ diskMode = "MMap(memory mmaped)";
+ break;
+ case direct_io:
+ diskMode = "Direct (non-buffered)";
+ break;
+ default:
+ throw new IllegalArgumentException("Unknown commitlog disk
access mode type: " + DatabaseDescriptor.getCommitLogDiskAccessMode());
Review Comment:
My suggestion is that you can describe these configurations in detail in the
yaml file. For logs, we may need the information to be concise, and the
information needs to reflect the key points. I think diskAccessMode(mmap,direct
io,standard) is enough, see
[here](https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L525),
these logs do not logging like what you have done. If you want to know more
information, it can be explained in the description of the configuration file.
And I think we may logging here
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L525
as these codes have done, just tell the user we are using what kind of mode
for diskAccess, for indexAccess, for commitLogAccess .
##########
src/java/org/apache/cassandra/db/commitlog/CommitLog.java:
##########
@@ -129,6 +131,25 @@ private static CommitLog construct()
// register metrics
metrics.attach(executor, segmentManager);
+
+ String diskMode = " ";
+
+ switch (DatabaseDescriptor.getCommitLogDiskAccessMode())
+ {
+ case standard:
+ diskMode = "Standard (buffered)";
+ break;
+ case mmap:
+ diskMode = "MMap(memory mmaped)";
+ break;
+ case direct_io:
+ diskMode = "Direct (non-buffered)";
+ break;
+ default:
+ throw new IllegalArgumentException("Unknown commitlog disk
access mode type: " + DatabaseDescriptor.getCommitLogDiskAccessMode());
Review Comment:
My suggestion is that you can describe these configurations in detail in the
yaml file. For logs, we may need the information to be concise, and the
information needs to reflect the key points. I think diskAccessMode(mmap,direct
io,standard) is enough, see
[here](https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L525),
these logs do not logging like what you have done. If you want to know more
information, it can be explained in the description of the configuration file.
And I think we may logging here
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L525
as these codes have done, just tell the user we are using what kind of mode
for diskAccess, for indexAccess, for commitLogAccess .
--
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]