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

Ishan Chattopadhyaya commented on SOLR-14003:
---------------------------------------------

It is a precursor to SOLR-13951. Obtaining accurate state for a replica 
shouldn't be available without a replica state provider. Today, that logic can 
be wired into a concrete class of the provider using same logic. In SOLR-13951, 
the provider can supply that state optimistically (cached).

> Refactor code to avoid reading state of replica from the data object  
> ----------------------------------------------------------------------
>
>                 Key: SOLR-14003
>                 URL: https://issues.apache.org/jira/browse/SOLR-14003
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Noble Paul
>            Priority: Major
>
> Deprecate
>  * {{Replica#getState()}}
>  * {{Replica#isActive()}}
> Use an implementation of {{ReplicaStateProvider}} to fetch the state
> {code:java}
> /**An implementation that fetches the state of each replica in a collection
>  * and it also provides the leader of shards
>  *
>  */
> public interface ReplicaStateProvider {
>   Replica.State getState(Replica replica);
>   Replica getLeader(Slice slice);
>   boolean isActive(Replica replica);
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to