patsonluk opened a new pull request, #1095: URL: https://github.com/apache/solr/pull/1095
https://issues.apache.org/jira/browse/SOLR-16478 # Description For further improvements based on https://issues.apache.org/jira/browse/SOLR-16414, there are places that we should remove PRS entry operations from overseer: 1. In `ZkController#unregister`, the PRS hosting node should remove the PRS entries from ZK, as overseer no longer does so as in the change of https://github.com/apache/solr/pull/1019/files#diff-b08497f972c47127009b59dc49de322698312c08ee53684d6e916db256db16a2L149 2. We should as well remove the PRS entries ops from Overseer in `SliceMutator#addReplica` https://github.com/apache/solr/blob/c96c78132d77974adaec62ffaaf4b819f76f49a9/solr/core/src/java/org/apache/solr/cloud/overseer/SliceMutator.java#L112-L123 # Solution For `ZkController#unregister`, add operations to remove the PRS entries For `SliceMutator#addReplica` , it should no longer perform operation to add PRS entries # Tests For `ZkController#unregister`, enhanced the existing test case `PerReplicaStatesIntegrationTest#testPerReplicaStateCollection`, to test on replica removal as well. Before the fix, the PRS state fetched from `PerReplicaStatesFetcher` would show that the replica was NOT removed. But after the fix, it show the correct PRS state count. For `SliceMutator#addReplica`, it is a bit tricky to verify. We added a new add replcia call and ZK child node version check in `PerReplicaStatesIntegrationTest#testZkNodeVersions`, though the child node version is the same before and after the fix. As before the fix, the `AddReplicaCmd` which calls `SliceMutator#addReplica` would add the PRS entries (which is incorrect), but even if we removed the PRS op from `SliceMutator#addReplica`, the state.json insertion would still "TOUCH" the PRS entries, hence ended up with the same child version increment. But anyway, it is still good with the new test case to verify the child version number. # Checklist Please review the following and check all that apply: - [ ] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) 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](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended) - [ ] 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](https://github.com/apache/solr/tree/main/solr/solr-ref-guide) -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org