CASSANDRA-17736: Update Config when properties are changed via JMX#4703
Open
sedulam wants to merge 1 commit intoapache:trunkfrom
Open
CASSANDRA-17736: Update Config when properties are changed via JMX#4703sedulam wants to merge 1 commit intoapache:trunkfrom
sedulam wants to merge 1 commit intoapache:trunkfrom
Conversation
smiklosovic
reviewed
Apr 8, 2026
| { | ||
| Supplier<NodeProximity> factory = () -> new SnitchAdapter(DatabaseDescriptor.createEndpointSnitch(epSnitchClassName)); | ||
| updateProximityInternal(factory, dynamic, dynamicUpdateInterval, dynamicResetInterval, dynamicBadnessThreshold); | ||
| DatabaseDescriptor.setEndpointSnitch(epSnitchClassName); |
Contributor
There was a problem hiding this comment.
I would probably move this inside updateProximityInternal and updated it there, so that method updates everything. epSnitchClassName would be just another parameter to updateProximityInternal. We are doing that for setDynamicSnitch already so ...
90776b3 to
5b57874
Compare
For snitch/dynamic_snitch, update Config fields inside updateProximityInternal so the Settings Virtual Table reflects the runtime state. For FQL and audit logging, resolve values directly from FullQueryLogger and AuditLogManager runtime instances, which revert to yaml defaults when disabled. Patch by Pedro Gordo; reviewed by Stefan Miklosovic, Marcus Eriksson for CASSANDRA-17736
5b57874 to
c4d1bf3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several JMX methods updated runtime state but never wrote back to the Config object, causing the Settings Virtual Table (
system_views.settings) to show stale values after runtime changes.Properties fixed:
endpoint_snitch—updateSnitch()now updatesconf.endpoint_snitchnode_proximity—updateNodeProximity()now updatesconf.node_proximitydynamic_snitch—updateProximityInternal()now updatesconf.dynamic_snitchwhen the dynamic parameter is explicitly providedaudit_logging_options—enableAuditLog()/disableAuditLog()now updateconf.audit_logging_optionsfull_query_logging_options—enableFullQueryLogger()now updatesconf.full_query_logging_optionsFull audit of all 144 properties from the ticket attached as
CASSANDRA-17736-audit.md. Of the 144 properties, 45 are correctly aligned, 88 have no JMX setter, 5 no longer exist on trunk, and 4 were misaligned (fixed in this patch). 2 properties from the original list (table_count_warn_threshold,keyspace_count_warn_threshold) are no longer in Config.java on trunk.Patch by Pedro Gordo for CASSANDRA-17736