adelapena commented on code in PR #1748:
URL: https://github.com/apache/cassandra/pull/1748#discussion_r929082648


##########
src/java/org/apache/cassandra/service/GCInspector.java:
##########
@@ -55,7 +55,7 @@ public class GCInspector implements NotificationListener, 
GCInspectorMXBean
     public static final String MBEAN_NAME = 
"org.apache.cassandra.service:type=GCInspector";
     private static final Logger logger = 
LoggerFactory.getLogger(GCInspector.class);
     private volatile long gcLogThreshholdInMs = 
DatabaseDescriptor.getGCLogThreshold();
-    private volatile long gcWarnThreasholdInMs = 
DatabaseDescriptor.getGCWarnThreshold();
+    private volatile long gcWarnThresholdInMs = 
DatabaseDescriptor.getGCWarnThreshold();

Review Comment:
   As in CASSANDRA-17735, I think I would remove `GCInspector`'s local copies 
of `Config`'s `gc_log_threshold_in_ms` and `gc_warn_threshold_in_ms`. Keeping 
those properties in a single place should easy synchronization. 
   
   For example, `GCInspector#gcLogThreshholdInMs` and 
`GCInspector#gcWarnThresholdInMs` are marked as `volatile`, so changes to these 
properties via JMX should be visible for other JMX readers and `GCInspector` 
itself. However, `Config#gc_log_threshold_in_ms` and 
`Config#gc_warn_threshold_in_ms` aren't marked as `volatile`. Thus, changes 
done to those properties through JMX could not be visible for the settings 
virtual table. Conversely, we could see the opposite situation when we have 
writable virtual tables.



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