smiklosovic commented on code in PR #4515:
URL: https://github.com/apache/cassandra/pull/4515#discussion_r2594188302
##########
src/java/org/apache/cassandra/service/disk/usage/DiskUsageMonitor.java:
##########
@@ -59,11 +59,13 @@ public class DiskUsageMonitor
private final Supplier<Multimap<FileStore, Directories.DataDirectory>>
dataDirectoriesSupplier;
private volatile DiskUsageState localState = DiskUsageState.NOT_AVAILABLE;
+ private volatile boolean enabled;
@VisibleForTesting
public DiskUsageMonitor()
{
this.dataDirectoriesSupplier =
DiskUsageMonitor::dataDirectoriesGroupedByFileStore;
+ this.enabled = false; // Default to false. Will be set to true on the
first call to `start`
Review Comment:
do you really need to do this? is not false default value for boolean
anyway? Also, it should be moved to the below constructor and here replace this
one with `this(DiskUsageMonitor::dataDirectoriesGroupedByFileStore)`
--
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]