[ 
https://issues.apache.org/jira/browse/IGNITE-29360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anton Vinogradov updated IGNITE-29360:
--------------------------------------
    Description: 
{{ignite.sh -systemProps}} does not print some system properties that Ignite 
declares with {{@SystemProperty}}.

h3. Cases
* *Calcite properties when ignite-zookeeper is on the class path.* The static 
block of {{CommandLineStartup}} adds the classes of optional modules to 
{{PROPS_CLS}} inside one {{try}}. When {{ZookeeperDiscoveryImpl}} is on the 
class path, the block also loads 
{{org.apache.ignite.spi.discovery.tcp.ipfinder.zk.TcpDiscoveryZookeeperIpFinder}}.
 That class moved to ignite-extensions in IGNITE-16182, so {{Class.forName}} 
throws {{ClassNotFoundException}}. The block catches it and never checks 
{{CalciteQueryProcessor}}, so {{IGNITE_CALCITE_PLANNER_TIMEOUT}} and 
{{IGNITE_CALCITE_USE_QUERY_BLOCKING_TASK_EXECUTOR}} are not printed.
* *{{IGNITE_IDLE_VERIFY_POOL_SIZE}}.* {{PoolProcessor}} declares it in a 
private field, and {{PROPS_CLS}} does not list the class, so the property is 
never printed. Its default ends with a dot, which 
{{CommandLinePrintPropertiesTest}} rejects for listed classes.

The block also checks 
{{org.apache.ignite.internal.processors.query.h2.database.H2Tree}}. The class 
does not exist since IGNITE-13056, and its property is now declared in 
{{IgniteSystemProperties}}, so this check does nothing.

{{CommandLinePrintPropertiesTest}} misses both cases: it runs without the 
optional modules and checks only the classes that {{PROPS_CLS}} lists.

h3. How to reproduce
Build all modules and run {{CommandLineStartup -systemProps}} with all of them 
on the class path. It prints 251 properties without the two Calcite ones. 
Without ignite-zookeeper, it prints 249 properties with them. 
{{IGNITE_IDLE_VERIFY_POOL_SIZE}} is missing in both runs.

h3. Expected result
* {{ignite.sh -systemProps}} prints every system property of the modules on the 
class path. A missing class of one optional module does not hide the properties 
of another.
* A test fails when a class declares a system property that {{ignite.sh 
-systemProps}} does not print.

h3. Effect on the public behavior check
The *Public behavior changes* check of IGNITE-29351 compares what {{ignite.sh 
-systemProps}} prints with every module on the class path. Until this bug is 
fixed, the check does not compare the three properties above: a PR that changes 
their defaults or removes them passes without an RFC. If the fix lands after 
the check, the PR with the fix shows them as added properties.

  was:
{{ignite.sh -systemProps}} does not print the system properties of the Calcite 
engine when ignite-zookeeper is on the class path.

h3. Cause
The static block of {{CommandLineStartup}} adds the classes of optional modules 
to {{PROPS_CLS}} inside one {{try}}. When {{ZookeeperDiscoveryImpl}} is on the 
class path, the block also loads 
{{org.apache.ignite.spi.discovery.tcp.ipfinder.zk.TcpDiscoveryZookeeperIpFinder}}.
 That class moved to ignite-extensions in IGNITE-16182, so {{Class.forName}} 
throws {{ClassNotFoundException}}. The block catches it and never checks 
{{CalciteQueryProcessor}}, so two properties are not printed:
* {{IGNITE_CALCITE_PLANNER_TIMEOUT}};
* {{IGNITE_CALCITE_USE_QUERY_BLOCKING_TASK_EXECUTOR}}.

The block also checks 
{{org.apache.ignite.internal.processors.query.h2.database.H2Tree}}. This class 
does not exist since IGNITE-13056, so that check never adds a class.

h3. Fix
Check each optional module on its own, so that a missing class of one module 
does not hide the properties of another. Remove the classes that no longer 
exist.

h3. Effect on the public behavior check
The *Public behavior changes* check of IGNITE-29351 compares what {{ignite.sh 
-systemProps}} prints with every module on the class path. Until this bug is 
fixed, the check does not compare the two Calcite properties: a PR that changes 
their defaults or removes them passes without an RFC. If the fix lands after 
the check, the PR with the fix shows the two properties as added.

        Summary: ignite.sh -systemProps misses some system properties  (was: 
ignite.sh -systemProps misses Calcite properties when ZooKeeper discovery is on 
the class path)

> ignite.sh -systemProps misses some system properties
> ----------------------------------------------------
>
>                 Key: IGNITE-29360
>                 URL: https://issues.apache.org/jira/browse/IGNITE-29360
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Anton Vinogradov
>            Priority: Major
>
> {{ignite.sh -systemProps}} does not print some system properties that Ignite 
> declares with {{@SystemProperty}}.
> h3. Cases
> * *Calcite properties when ignite-zookeeper is on the class path.* The static 
> block of {{CommandLineStartup}} adds the classes of optional modules to 
> {{PROPS_CLS}} inside one {{try}}. When {{ZookeeperDiscoveryImpl}} is on the 
> class path, the block also loads 
> {{org.apache.ignite.spi.discovery.tcp.ipfinder.zk.TcpDiscoveryZookeeperIpFinder}}.
>  That class moved to ignite-extensions in IGNITE-16182, so {{Class.forName}} 
> throws {{ClassNotFoundException}}. The block catches it and never checks 
> {{CalciteQueryProcessor}}, so {{IGNITE_CALCITE_PLANNER_TIMEOUT}} and 
> {{IGNITE_CALCITE_USE_QUERY_BLOCKING_TASK_EXECUTOR}} are not printed.
> * *{{IGNITE_IDLE_VERIFY_POOL_SIZE}}.* {{PoolProcessor}} declares it in a 
> private field, and {{PROPS_CLS}} does not list the class, so the property is 
> never printed. Its default ends with a dot, which 
> {{CommandLinePrintPropertiesTest}} rejects for listed classes.
> The block also checks 
> {{org.apache.ignite.internal.processors.query.h2.database.H2Tree}}. The class 
> does not exist since IGNITE-13056, and its property is now declared in 
> {{IgniteSystemProperties}}, so this check does nothing.
> {{CommandLinePrintPropertiesTest}} misses both cases: it runs without the 
> optional modules and checks only the classes that {{PROPS_CLS}} lists.
> h3. How to reproduce
> Build all modules and run {{CommandLineStartup -systemProps}} with all of 
> them on the class path. It prints 251 properties without the two Calcite 
> ones. Without ignite-zookeeper, it prints 249 properties with them. 
> {{IGNITE_IDLE_VERIFY_POOL_SIZE}} is missing in both runs.
> h3. Expected result
> * {{ignite.sh -systemProps}} prints every system property of the modules on 
> the class path. A missing class of one optional module does not hide the 
> properties of another.
> * A test fails when a class declares a system property that {{ignite.sh 
> -systemProps}} does not print.
> h3. Effect on the public behavior check
> The *Public behavior changes* check of IGNITE-29351 compares what {{ignite.sh 
> -systemProps}} prints with every module on the class path. Until this bug is 
> fixed, the check does not compare the three properties above: a PR that 
> changes their defaults or removes them passes without an RFC. If the fix 
> lands after the check, the PR with the fix shows them as added properties.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to