Aliases API times out when actions end up with no actual change to aliases
closes #2345
This commit is contained in:
parent
a3e7daf415
commit
faa7501715
|
@ -159,10 +159,16 @@ public class MetaDataIndexAliasesService extends AbstractComponent {
|
|||
|
||||
if (changed) {
|
||||
ClusterState updatedState = newClusterStateBuilder().state(currentState).metaData(builder).build();
|
||||
// even though changes happened, they resulted in 0 actual changes to metadata
|
||||
// i.e. remove and add the same alias to the same index
|
||||
if (updatedState.metaData().aliases().equals(currentState.metaData().aliases())) {
|
||||
listener.onResponse(new Response(true));
|
||||
return currentState;
|
||||
}
|
||||
// wait for responses from other nodes if needed
|
||||
int responseCount = updatedState.getNodes().size();
|
||||
int responseCount = updatedState.nodes().size();
|
||||
long version = updatedState.version() + 1;
|
||||
logger.trace("Waiting for [{}] notifications with version [{}]", responseCount, version);
|
||||
logger.trace("waiting for [{}] notifications with version [{}]", responseCount, version);
|
||||
aliasOperationPerformedAction.add(new CountDownListener(responseCount, listener, version), request.timeout);
|
||||
|
||||
return updatedState;
|
||||
|
|
Loading…
Reference in New Issue