julianchandras opened a new pull request, #5313:
URL: https://github.com/apache/solr/pull/5313

   https://issues.apache.org/jira/browse/SOLR-18630
   
   <!--
   _(If you are a project committer then you may remove some/all of the 
following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system 
for Solr:
   
   * https://issues.apache.org/jira/projects/SOLR
   
   For something minor (i.e. that wouldn't be worth putting in release notes), 
you can skip JIRA.
   To create a Jira issue, you will need to create an account there first.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * SOLR-####: <short description of problem or changes>
   
   SOLR must be fully capitalized. A short description helps people scanning 
pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly 
updated with code review comments and commits. -->
   
   
   # Description
   
   Since SOLR-17864, the default wait for ZooKeeper at node startup is 30000 
seconds instead of 30. This is because when `solr.cloud.wait.for.zk.seconds` is 
not set, the fallback `SolrZkClientTimeout.DEFAULT_ZK_CLIENT_TIMEOUT` (already 
in milliseconds) is multiplied by 1000.
   
   Also, the legacy system property `-DwaitForZk` is silently ignored, while 
the legacy env var `SOLR_WAIT_FOR_ZK` works with a deprecation warning.
   
   # Solution
   
   - `NodeConfig.getStartUpZkTimeOutMillis` converts the property from seconds 
when it is set, and otherwise uses `DEFAULT_ZK_CLIENT_TIMEOUT` as is.
   - The two legacy names canonicalize to different property names 
(`SOLR_WAIT_FOR_ZK` becomes `solr.wait.for.zk`, while `-DwaitForZk` becomes 
`wait.for.zk`), so a single entry in 
`DeprecatedSystemPropertyMappings.properties` can only match one of them. 
Modified `EnvUtils` to accept several comma-separated legacy names per 
property, and updated the entry to list both.
   
   Written with Claude Code.
   
   # Tests
   
   - `TestSolrXml.java`: Test that the solr.cloud.wait.for.zk.seconds property 
is read with the right unit
   - `EnvUtilsTest.java`: Test that the legacy `-DwaitForZk` and 
`SOLR_WAIT_FOR_ZK` set `solr.cloud.wait.for.zk.seconds` and log a deprecation 
warning
   
   `TestSolrXml` mostly covers solr.xml parsing, so I'm happy to move the new 
tests if there is a better location.
   
   cc @epugh
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to