Skip to content

CASSANDRA-17736: Update Config when properties are changed via JMX#4703

Open
sedulam wants to merge 1 commit intoapache:trunkfrom
sedulam:pgordo/CASSANDRA-17736/trunk
Open

CASSANDRA-17736: Update Config when properties are changed via JMX#4703
sedulam wants to merge 1 commit intoapache:trunkfrom
sedulam:pgordo/CASSANDRA-17736/trunk

Conversation

@sedulam
Copy link
Copy Markdown
Contributor

@sedulam sedulam commented Apr 4, 2026

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_snitchupdateSnitch() now updates conf.endpoint_snitch
  • node_proximityupdateNodeProximity() now updates conf.node_proximity
  • dynamic_snitchupdateProximityInternal() now updates conf.dynamic_snitch when the dynamic parameter is explicitly provided
  • audit_logging_optionsenableAuditLog()/disableAuditLog() now update conf.audit_logging_options
  • full_query_logging_optionsenableFullQueryLogger() now updates conf.full_query_logging_options

Full 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

{
Supplier<NodeProximity> factory = () -> new SnitchAdapter(DatabaseDescriptor.createEndpointSnitch(epSnitchClassName));
updateProximityInternal(factory, dynamic, dynamicUpdateInterval, dynamicResetInterval, dynamicBadnessThreshold);
DatabaseDescriptor.setEndpointSnitch(epSnitchClassName);
Copy link
Copy Markdown
Contributor

@smiklosovic smiklosovic Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sedulam sedulam force-pushed the pgordo/CASSANDRA-17736/trunk branch 3 times, most recently from 90776b3 to 5b57874 Compare April 9, 2026 16:15
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
@sedulam sedulam force-pushed the pgordo/CASSANDRA-17736/trunk branch from 5b57874 to c4d1bf3 Compare April 11, 2026 16:01
@pmcfadin pmcfadin added the needs-committer Patch ready, waiting for a committer to review and merge label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-committer Patch ready, waiting for a committer to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants