[
https://issues.apache.org/jira/browse/CASSANDRA-15254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723122#comment-17723122
]
Maxim Muzafarov commented on CASSANDRA-15254:
---------------------------------------------
I would say in a nutshell that we have 4 possible options that we can go to
from a very high-level perspective. Each option is implemented differently, so
we must first agree on a high-level solution design.
- new annotation (@Mutable, @Validate or any other) containing a reference to
validation rules e.g. pointing to the validation method to call or a validation
class to use;
- enforce set values using the corresponding field's setter methods, assuming a
method name matches the field name;
- use all methods like `applySimpleConfig` as they are in the same order to
validate every configuration change;
- use external frameworks to perform everything we need;
I have discussed all these possible solutions with [~dcapwell] and we have come
up with the following key points:
# We create a new annotation that contains the way a particular configuration
field is validated - the reference to the method
{{@Validate(source=DatabaseDescriptor.class,
setter="setPermissionsCacheMaxEntries")}}
# The validation method has the following signature. For example, for the
property with {{Integer}} type:
{{public static Integer validateConcurrentCompactors(Config conf, String name,
Integer newValue)}}
# These methods are reused within the general {{applySimpleConfig}} methods;
# We have to add property access methods to the {{DatabaseDescriptor}}:
{{DatabaseDescriptor.getField(String name) and
DatabaseDescriptor.setField(String name, Object value)}}
# {{fromString}} and {{toString}} methods that are required to serialize and
deserialize configuration objects to work with we should try to reuse something
corresponding from the Yaml as we are only working with yaml-config;
> Allow UPDATE on settings virtual table to change running configurations
> -----------------------------------------------------------------------
>
> Key: CASSANDRA-15254
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15254
> Project: Cassandra
> Issue Type: New Feature
> Components: Feature/Virtual Tables
> Reporter: Chris Lohfink
> Assignee: Maxim Muzafarov
> Priority: Normal
> Fix For: 5.x
>
> Attachments: Configuration Registry Diagram.png
>
> Time Spent: 4h 50m
> Remaining Estimate: 0h
>
> Allow using UPDATE on the system_views.settings virtual table to update
> configs at runtime for the equivalent of the dispersed JMX
> attributes/operations.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]