OpenSearch/x-pack/plugin/ccr
Tanguy Leroux b5ac0204d2
Fail earlier Put Follow requests for closed leader indices (#47637)
Backport of (#47582)

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.
2019-10-07 13:59:04 +02:00
..
qa Restrict which tasks can use testclusters (#45198) 2019-08-09 13:38:01 +03:00
src Fail earlier Put Follow requests for closed leader indices (#47637) 2019-10-07 13:59:04 +02:00
build.gradle Close connection manager on current thread in RemoteClusterConnection (#44805) 2019-07-25 09:34:41 +02:00