[
https://issues.apache.org/jira/browse/CASSANDRA-17797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17646618#comment-17646618
]
Maxim Muzafarov commented on CASSANDRA-17797:
---------------------------------------------
Hey,
[~mck], [~e.dimitrova]
Please, take a look at my pull request - [GitHub PullRequest:
2010|https://github.com/apache/cassandra/pull/2046/files]. As you mentioned
earlier, we will expose some added system properties (properties with
_cassandra._ prefix are already exposed) to the public API via a virtual table.
If we agree on this pull request in general I'll post a new message to the dev
list to share it with the community.
I think it may be a good idea to add a new column to the system properties
virtual table thus users will be able to see the impact of a particular
property on their production environment. The list properties are easy to
filter. To achieve this goal I've marked the properties related to the test
environment with the {_}TEST_{_} prefix. If we agree on this I can create a new
JIRA issue.
h3. The implementation notes
- the checkstyle rule added to force the CassandraRelevantProperties usage;
- the enum pattern that was used: upper-casing property name with replacing
{*}`{*}{_}.`{*}{*}{_} to *{_}`{_}`* _and removing _cassandra._ prefix;
- all newly added properties are sorted by their name;
- properties that are related to test/debug are marked with the {_}TEST{_}_
prefix;
- setInt(), setString() etc. now return the previous value for convenient
usage in the test source code;
h3. The public API changes
Newly production system properties added:
- io.netty.eventLoopThreads
- io.netty.transport.estimateSizeOnSubmit
- java.security.auth.login.config
- javax.rmi.ssl.client.enabledCipherSuites
- javax.rmi.ssl.client.enabledProtocols
- ssl.enable
- log4j2.disable.jmx
- log4j2.shutdownHookEnabled
- logback.configurationFile
Newly added and used for tests only:
- invalid-legacy-sstable-root
- legacy-sstable-root
- org.apache.cassandra.tools.UtilALLOW_TOOL_REINIT_FOR_TEST
- org.caffinitas.ohc.segmentCount
- suitename
- sun.stderr.encoding
- sun.stdout.encoding
- test.bbfailhelper.enabled
- write_survey
I've run some tests over my PR, but I'm not sure that I did everything
correctly since I have a lack of experience with the Cassandras test for now. I
will be very appreciative if you tell me what I should pay attention to first.
https://app.circleci.com/pipelines/github/Mmuzaf/cassandra/23/workflows/91bae849-8d91-47d0-8bc6-d9fc6ac7dd76
https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/2100/
> All system properties and environment variables should be accessed via the
> new CassandraRelevantProperties and CassandraRelevantEnv classes
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-17797
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17797
> Project: Cassandra
> Issue Type: Improvement
> Components: Local/Config
> Reporter: Ekaterina Dimitrova
> Assignee: Maxim Muzafarov
> Priority: Low
> Fix For: 4.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Follow up ticket for CASSANDRA-15876 -
> "Always access system properties and environment variables via the new
> CassandraRelevantProperties and CassandraRelevantEnv classes"
> As part of that ticket we moved to the two new classes only
> properties/variables that were currently listed in System Properties Virtual
> Table.
> We have to move to those classes the rest of the properties around the code
> and start using those classes to access all of them.
> +Additional information for newcomers:+
> You might want to start by getting acquainted with
> CassandraRelevantProperties and CassandraRelevantEnv classes. Also, you might
> want to check what changes were done and how the first batch was transferred
> to this new framework as part of
> [CASSANDRA-15876|https://github.com/apache/cassandra/commit/7694c1d191531ac152db55e83bc0db6864a5441e]
> We are interested into the properties accessed currently through
> getProperties around the code.
> As part of CASSANDRA-15876 relevant unit tests were added
> (CassandraRelevantPropertiesTest). To verify the new patch we need to ensure
> that all tests Cassandra pass and also to think about potential update of the
> mentioned test class.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]