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

Arun Ganesh commented on CASSANDRA-19400:
-----------------------------------------

Copying over a few comments from [~maedhroz] on Github,

contactForRead() just generates a sub-list from left to right, so that should 
work. In most cases, the sort shouldn't even happen, as UNKNOWN states should 
be transient/rare. Since the number of nodes in this state should very small, 
and we may have a large cluster, I'd also make the initial size of 
queryableNonSucceeded something reasonably small, like 4 (w/ a comment), or 
even use the default (16). With the ReplicaCollection.Builder it made sense to 
do the opposite, but that, in retrospect, would not have been very nice either 
in a large cluster with most things built/succeeded (aside from avoiding 
resizing).

For partition-restricted index queries, the liveEndpoints might be small, of 
course, but I'd still size queryableNonSucceeded explicitly at something like 4.

> IndexStatusManager needs to prioritize SUCCESS over UNKNOWN states to 
> maximize availability
> -------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-19400
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19400
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Feature/SAI
>            Reporter: Caleb Rackliffe
>            Assignee: Arun Ganesh
>            Priority: Low
>             Fix For: 5.0.x, 5.x
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> {{IndexStatusManager}} is responsible for knowing what SAI indexes are 
> queryable across the ring, endpoint by endpoint. There are two statuses that 
> SAI treats as queryable, but it should not treat them equally. 
> {{BUILD_SUCCEEDED}} means the index is definitely available and should be 
> able to serve queries without issue. {{UNKNOWN}} indicates that the status of 
> the index hasn’t propagated yet to this coordinator. It may be just fine, or 
> it may not be. If it isn’t a query will not return incorrect results, but it 
> will fail. If there are enough {{BUILD_SUCCEEDED}} replicas, we should ignore 
> {{UNKNOWN}} replicas and maximize availability. If the UNKNOWN replica is 
> going to become {{BUILD_SUCCEEDED}} shortly, it will happily start taking 
> requests at that point and spread the load. If not, we’ll avoid futile 
> attempts to query it too early.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to