Skip to content

SOLR-18388: remove the deprecated ZkStateReader collection-path delegates - #4767

Open
serhiy-bzhezytskyy wants to merge 1 commit into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18388-remove-zkstatereader-collectionpath
Open

SOLR-18388: remove the deprecated ZkStateReader collection-path delegates#4767
serhiy-bzhezytskyy wants to merge 1 commit into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18388-remove-zkstatereader-collectionpath

Conversation

@serhiy-bzhezytskyy

@serhiy-bzhezytskyy serhiy-bzhezytskyy commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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

Removes ZkStateReader.getCollectionPathRoot/getCollectionPath — one-line delegates to the same-named DocCollection methods. A bare-name census is useless here (18 production + 39 test hits, mostly DocCollection's own untouched methods); receiver-qualified, the removed pair had 0 production callers and 4 test ones (ZkStateReaderTest, ZkStateWriterTest, both already importing DocCollection). getCollectionPathRoot had 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)

…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant