You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/07/25 16:33:18 UTC
[GitHub] [cassandra] adelapena commented on a diff in pull request #1748: 17737 4.0
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org