SOLR-18388: remove the deprecated ZkStateReader collection-path delegates - #4767
Open
serhiy-bzhezytskyy wants to merge 1 commit into
Open
Conversation
…ates Both were one-line delegates to DocCollection with the same method names, so a census on the bare name is useless here: it reports 18 production and 39 test references, and receiver-qualified the deprecated pair has zero production callers and four test ones. getCollectionPathRoot had no reference anywhere at all; getCollectionPath was kept in the tree by ZkStateReaderTest and ZkStateWriterTest, which now call DocCollection directly. Both files already imported it. The 50-odd remaining references are to DocCollection's own methods, which are the replacement and are untouched. 22 tests in the two affected classes, spotless green, and no new long lines - the rewrite is three characters shorter, not longer, so unlike SOLR-18386 there was nothing to reflow. Verified: compileJava on solrj-zookeeper, compileTestJava on core, ecjLintMain on solrj-zookeeper, ecjLintTest on core, spotlessJavaCheck on both, and ZkStateReaderTest + ZkStateWriterTest - 22 tests, 0 failures. Simulated merge order against SOLR-18386 (apache#4766, open PR sharing ZkStateReaderTest.java) - merged first into a scratch branch off origin/main, this patch still applies cleanly. SOLR-18370 (local, not yet a PR) also touches ZkStateReader.java; re-check once it opens a PR and either merges. AI-assisted (Claude Sonnet 5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/SOLR-18388
Removes
ZkStateReader.getCollectionPathRoot/getCollectionPath— one-line delegates to the same-namedDocCollectionmethods. A bare-name census is useless here (18 production + 39 test hits, mostlyDocCollection's own untouched methods); receiver-qualified, the removed pair had 0 production callers and 4 test ones (ZkStateReaderTest,ZkStateWriterTest, both already importingDocCollection).getCollectionPathRoothad 0 references anywhere.22 tests, 0 failures. Unlike SOLR-18386, the rename is 3 chars shorter, so no reflow.
SOLR-18386 (#4766, already open) shares ZkStateReaderTest.java -- simulated merged first, applies cleanly. SOLR-18370 (local, not yet a PR) also touches ZkStateReader.java -- re-check for conflicts once it opens a PR and either merges.
AI-assisted (Claude Sonnet 5)