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

Shai Erera commented on SOLR-8617:
----------------------------------

I agree w/ [~anshumg], I feel like the ASYNC call is enough for this use case. 
If the connection times out, the client needs to issue CLUSTERSTATUS until it's 
ACTIVE, and so we didn't gain anything. Also, in the general case, a Solr node 
may be restarted, and by the time it got back up it may need to recover from 
the leader, therefore being unusable for a certain amount of time. So I don't 
see an ADDREPLICA as different.

I'd say that shard splitting and adding replicas should be considered as long 
running operations, and therefore you should use the ASYNC option.

BTW, SPLITSHARD says that it returns when the shard has been split, but it 
doesn't say what's the status of the new replicas specifically. So when it 
returns, I know the shard has been split, but do the new sub shards already 
have their {{repFactor}} replicas? Are they all ACTIVE?

In any case, I think that ADDREPLICA and SPLITSHARD are consistent now: both 
return when the command was executed. But because of the nature of our async 
operations with replicas and recovery, the new replicas/shards may not yet be 
usable. But that's seamless in Solr in general, and is taken care of. So I 
think we shouldn't complicate the API and just advertise the use of ASYNC more.

FWIW, I think we should have an ASYNC option on DELETESHARD too, since deleting 
a very big shard w/ many replicas may timeout the HTTP connection. But that's a 
matter for a different issue.

> Add a wait for active option in to add replica
> ----------------------------------------------
>
>                 Key: SOLR-8617
>                 URL: https://issues.apache.org/jira/browse/SOLR-8617
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Varun Thacker
>            Priority: Minor
>
> Currently the AddReplica call returns success as soon as the replica is 
> created . It doesn't wait for the replica to become active .
> It would be useful to add a waitForActive flag so that the call would block 
> till the replica becomes active.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to