[ 
https://issues.apache.org/jira/browse/SOLR-13136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18122111#comment-18122111
 ] 

Nick Shanin commented on SOLR-13136:
------------------------------------

🤖 AI text below 🤖 (posted on behalf of Nick Shanin)

I opened a PR for this: https://github.com/apache/solr/pull/5017

CreateShardCmd now creates a new shard in CONSTRUCTION state, waits for its 
replicas to become ACTIVE, and only then flips the shard to active, so queries 
no longer fail with "no servers hosting shard" during shard creation. A failed 
creation cleans up the partial shard. CreateShardConstructionTest watches the 
state during creation and queries throughout.

> Queries fail during shard creation [testcase included]
> ------------------------------------------------------
>
>                 Key: SOLR-13136
>                 URL: https://issues.apache.org/jira/browse/SOLR-13136
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 7.6
>            Reporter: Bram VD
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: TestSearchDuringShardCreation.java
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Shard creation takes a certain amount of time. Queries launched between the 
> start of shard creation and the full "upness" of the shard will fail: "Error 
> from server at foo: no servers hosting shard: bar".
> Ideally, shards should not be used in queries before their creation is fully 
> completed. A new shard is empty anyway, so its upness couldn't even influence 
> the query results in any way.
> I'm attaching a testcase which reproduces the problem. Tested on two 
> machines, but your mileage may vary assuming this is a concurrency issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to