serhiy-bzhezytskyy opened a new pull request, #4760:
URL: https://github.com/apache/solr/pull/4760

   Removes `DocCollection.getReplicas()` (flattened every slice into a fresh 
`ArrayList` on each call) and migrates 60 call sites — the real count, not the 
285 a plain `.getReplicas()` grep returns, since `Slice.getReplicas()` shares 
the name. The method was deleted first and the compiler's error list became the 
worklist.
   
   Split by source set: 2 production sites, 3 in `test-framework` (a published 
artifact), 55 across 32 test files — that's why this ticket is large despite 
"low usage" being correct about production.
   
   Where to look: `CollectionTooManyReplicasTest.java` has a local named 
`slice` already in scope at one call site, so the migrated loop there uses `s` 
instead — everywhere else uses `slice`. Three checks before trusting the swap: 
traversal order is unchanged (nothing was sorted), the three `.toList()` sites 
are read-only, and every asserted literal survives verbatim.
   
   413 tests across 32 changed classes, 0 failures. Compile is the actual 
census here — a failing build's first report showed 2 sites; the true number 
surfaced only once test-framework compiled too.
   
   SOLR-18378, SOLR-18380, SOLR-18381 and SOLR-18385 touch files this PR also 
touches — merging this one first should make those cleaner to extract.
   
   AI-assisted (Claude Sonnet 5)
   


-- 
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