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

Maxim Muzafarov commented on CASSANDRA-17797:
---------------------------------------------

[~e.dimitrova]
 # As I can see all the system properties that have the *"cassandra."* prefix 
are already included in the virtual tables, so if we directly add them to the 
_CassandraRelevantProperties_ nothing should change from the user's point of 
view.
[https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/virtual/SystemPropertiesTable.java#L76]
 # I also see some system properties that are not directly related to 
Cassandra's project however they are used for some configurations in production 
code as well as for tests e.g. [_io.netty.transport.estimateSizeOnSubmit_ 
|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L115],
 
[_"io.netty.eventLoopThreads"_|https://github.com/apache/cassandra/blob/trunk/test/distributed/org/apache/cassandra/distributed/test/NativeMixedVersionTest.java].
 From my point of view such properties should not be part of 
{_}CassandraRelevantProperties{_}, but correct me if I'm missing something here.
Am I?
 # And the last point - some of the properties are used only for test/debug 
purposes e.g. 
["cassandra.debugrefcount"|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/utils/concurrent/Ref.java#L96].
 It seems to me that _CassandraRelevantProperties_ is related to the public API 
and probably such properties should not be exposed to the public API at all. 
Should I also add them to this class?


One more thing that seems to be more important here: using system properties 
may affect lead to some performance issues due to the Hashtable being used 
under the hood for storing them, especially those that are used really often 
and are not cached to static variables. 

> 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: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to