Skip to content

Conversation

@tlrx
Copy link
Member

@tlrx tlrx commented Oct 7, 2019

Backport of #47582 for 7.4.

tlrx added 2 commits October 7, 2019 10:04
…7582)

Today when following a new leader index, we fetch the remote cluster state, 
check the remote cluster license, check the user privileges, retrieve the 
index shard stats before initiating a CCR restore session.

But if the leader index to follow is closed, we're executing a bunch of 
operations that would inevitability fail at some point (on retrieving the
 index shard stats, because this type of request forbid closed indices 
when resolving indices). We could fail a Put Follow request at the first 
step by checking the leader index state directly from the remote cluster 
state.

This also helps the Resume Follow API to fail a bit earlier.
@tlrx tlrx added :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features backport labels Oct 7, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/CCR)

@tlrx tlrx merged commit 2e89040 into elastic:7.4 Oct 7, 2019
@tlrx tlrx deleted the fail-earlier-when-following-closed-indices-7.4 branch October 7, 2019 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants