solr icon indicating copy to clipboard operation
solr copied to clipboard

SOLR-17620 Encode the version of Solr in SolrCloud "liveNode"

Open QFREEE opened this issue 9 months ago • 2 comments

https://issues.apache.org/jira/browse/SOLR-17620

Description

Please provide a short description of the changes you're making with this pull request.

Added following JSON to live node znode in ZkController.java.

Added access method in ZkStateReader.java

{
  "solrVersion":"10.0.0",
  "nodeName":"localhost:8983_solr",
  "roles":{
    "data":"on",
    "overseer":"allowed",
    "coordinator":"off"}
}

Solution

Please provide a short description of the approach taken to implement your solution.

Tests

Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.

Checklist

Please review the following and check all that apply:

  • [ ] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • [ ] I have created a Jira issue and added the issue ID to my pull request title.
  • [ ] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • [ ] I have developed this patch against the main branch.
  • [ ] I have run ./gradlew check.
  • [ ] I have added tests for my changes.
  • [ ] I have added documentation for the Reference Guide

QFREEE avatar Apr 02 '25 22:04 QFREEE

I'm looking forward to this getting in eventually!

dsmiley avatar May 21 '25 03:05 dsmiley

Let us know if you need help/guidance on seeing this through to completion.

dsmiley avatar Jun 09 '25 13:06 dsmiley

This PR has had no activity for 60 days and is now labeled as stale. Any new activity will remove the stale label. To attract more reviewers, please tag people who might be familiar with the code area and/or notify the [email protected] mailing list. To exempt this PR from being marked as stale, make it a draft PR or add the label "exempt-stale". If left unattended, this PR will be closed after another 60 days of inactivity. Thank you for your contribution!

github-actions[bot] avatar Aug 09 '25 00:08 github-actions[bot]

I'm going to take this over. If anyone has already done so beyond what's seen in this PR now, let me know.

dsmiley avatar Aug 09 '25 00:08 dsmiley

I addressed the pressing matters. This is ready to merge, and is back-portable to 9.10. I plan to do so Thursday.

The properties include the name of the node. I'm not sure why this was added, as it's redundant with the final path component name to the live node. Should I remove it? CC @HoustonPutman

Admittedly there's no test to read the role data. I have no current plans to read it; it's nice-to-have. Some caching would be nice but at least the use case I have in mind, it wouldn't be necessary.

dsmiley avatar Aug 19 '25 03:08 dsmiley

@HoustonPutman we spoke of failing to join a cluster if it'd bring down the effective version. I think that should be a distinct JIRA issue from this so I'll do so separately.

dsmiley avatar Aug 25 '25 03:08 dsmiley

@QFREEE Test case failing on branch_9x https://ci-builds.apache.org/job/Solr/job/Solr-Test-9.x/8602/console Build Log:

Reproduce with: ./gradlew :solr:core:test --tests "org.apache.solr.cloud.ZkControllerTest.testLiveNodeDataStored" -Ptests.haltonfailure=false "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=C73130F4D6CA4BDB -Ptests.multiplier=2 -Ptests.useSecurityManager=true -Ptests.badapples=false -Ptests.file.encoding=ISO-8859-1`

iamsanjay avatar Aug 26 '25 13:08 iamsanjay

@QFREEE Test case failing on branch_9x https://ci-builds.apache.org/job/Solr/job/Solr-Test-9.x/8602/console Build Log:

Reproduce with: ./gradlew :solr:core:test --tests "org.apache.solr.cloud.ZkControllerTest.testLiveNodeDataStored" -Ptests.haltonfailure=false "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=C73130F4D6CA4BDB -Ptests.multiplier=2 -Ptests.useSecurityManager=true -Ptests.badapples=false -Ptests.file.encoding=ISO-8859-1`

Yep, see also https://develocity.apache.org/scans/tests?search.rootProjectNames=solr-root&search.timeZoneId=Europe%2FOslo&tests.container=org.apache.solr.cloud.ZkControllerTest&tests.test=testLiveNodeDataStored

janhoy avatar Aug 29 '25 08:08 janhoy

Only occurred in branch_9x, fix in https://github.com/apache/solr/pull/3525

janhoy avatar Aug 29 '25 08:08 janhoy