[ 
https://issues.apache.org/jira/browse/CASSANDRA-17736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18070968#comment-18070968
 ] 

Pedro Gordo edited comment on CASSANDRA-17736 at 4/4/26 11:33 AM:
------------------------------------------------------------------

Completed audit of all 144 Config properties. Found 4 JMX methods that don't 
update Config, causing stale values in system_views.settings:
 * endpoint_snitch (updateSnitch)
 * dynamic_snitch (updateProximityInternal)
 * audit_logging_options (enableAuditLog/disableAuditLog)
 * full_query_logging_options (enableFullQueryLogger)

PR with fix and tests for trunk: 
[https://github.com/apache/cassandra/pull/4703] Full audit attached as 
[^CASSANDRA-17736-audit.md].

Current PR targets trunk only. Will prepare backport branches for cassandra-4.0 
and cassandra-4.1 per the ticket's fix versions — the snitch fix will need 
adaptation since pre-CEP-21 versions use IEndpointSnitch directly.

Side note: updateSnitch for changing the endpoint snitch class at runtime isn't 
documented and has limited practical value (topology changes require yaml edits 
+ restart). It's already deprecated on trunk (CASSANDRA-19488). Worth a 
separate ticket to deprecate on older branches?

 


was (Author: pedro_gordo):
I audited all 144 properties from Ekaterina's list on trunk and found 4 
misalignments where JMX setters updated runtime state but never wrote back to 
Config, causing the Settings Virtual Table to show stale values:

 
 * endpoint_snitch: updateSnitch() changed the runtime snitch object but never 
updated conf.endpoint_snitch
 * dynamic_snitch: updateProximityInternal() toggled dynamic wrapping but never 
updated conf.dynamic_snitch
 * audit_logging_options: enableAuditLog()/disableAuditLog() stored options in 
AuditLogManager but never updated conf.audit_logging_options
 * full_query_logging_options: enableFullQueryLogger() stored state in 
FullQueryLogger but never updated conf.full_query_logging_options

The remaining 138 properties are either correctly aligned (45) or have no JMX 
setter (88), plus 5 that no longer exist on trunk.

 

PR: [https://github.com/apache/cassandra/pull/4703]

 

Tests included — they fail on unfixed trunk and pass with the fix. Full audit 
breakdown also attached.[^CASSANDRA-17736-audit.md]

> Settings Virtual Table should display the values assigned to a property in 
> the DatabaseDescriptor on startup and not null (as per the yaml)
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17736
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17736
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Local/Config
>            Reporter: Ekaterina Dimitrova
>            Assignee: Pedro Gordo
>            Priority: Normal
>             Fix For: 4.0.x, 4.1.x, 6.x
>
>         Attachments: CASSANDRA-17736-audit.md
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> There are a few properties that after startup do not show their assigned 
> values as per the DatabaseDescriptor assignment but the cassandra.yaml value.
> They will not be also updated in the virtual table down the road in case they 
> are updated through JMX, nodetool etc.
> *EDIT: This ticket should serve to check the properties that are not type 
> Duration, Data Storage and Data Rate; also that are not new to 4.1.* I will 
> post a list of who are those later today for convenience. We target all those 
> in Config class (some advanced properties are not broadly advertised in 
> cassandra.yaml intentionally).
> There is [Settings Virtual Table 
> |https://cassandra.apache.org/doc/trunk/cassandra/new/virtualtables.html#settings-virtual-table]
>  which is supposed to show the values for our config parameters at any time. 
> Especially useful if any property was changed after startup through 
> JMX/nodetool and it doesn't match anymore the value in cassandra.yaml. For 
> this to be possible, we need to ensure that the parameters are always updated 
> in the Config class. It was observed that some are not always updating in 
> Config class, but after startup delegating to other internal variables. This 
> is a bug and this task should review and address any new findings. 
> Classes of interest - 
> [SettingsTable|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/virtual/SettingsTable.java]
>  where you can see how config parameters are listed; 
> [Config|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/config/Config.java]
>  class where our configuration parameters are defined.
> We need patches 4.0 and above. I suggest you start looking into 4.0 branch 
> and then merge into higher branches. As you won't be checking the data 
> storage, data rate and duration type parameters, there shouldn't be many 
> conflicts on merge. 
> We have a lot of parameters and I suggest you split the list into batches to 
> check and produce patches where/if needed to make the work more incremental 
> and easier to work on and review it.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to