You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "nick-boss-tech (via GitHub)" <gi...@apache.org> on 2026/10/02 21:12:53 UTC
[PR] SOLR-13136: Create new shards in CONSTRUCTION state so queries don't fail during shard creation [solr]
nick-boss-tech opened a new pull request, #5017:
URL: https://github.com/apache/solr/pull/5017
🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)*
https://issues.apache.org/jira/browse/SOLR-13136
A newly created shard used to become visible for queries before its replicas were ready, so queries routed to it during creation could fail with "no servers hosting shard". `CreateShardCmd` now creates the shard in CONSTRUCTION state, waits for its replicas to become ACTIVE, and only then flips the shard to active. If creation fails partway, the partial shard is cleaned up instead of being left behind.
`CreateShardConstructionTest` watches the collection state while a shard is being created and queries throughout, asserting the shard stays in CONSTRUCTION until its replicas are ACTIVE and that no query fails with "no servers hosting shard".
Validation on the final tree: Error Prone compile clean, `CreateShardConstructionTest` passes, `tidy` applied, `:solr:core:check -x test` green. The gate caught two `System.currentTimeMillis()` calls in the new test (forbidden APIs); the deadline now uses `System.nanoTime()`, and the test plus check were re-run green on the exact committed tree.
Changelog: `changelog/unreleased/SOLR-13136.yml` (type fixed).
### AI assistance
AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution.
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org