Fallback to TransportMasterNodeAction for cluster health retries (#28195)
ClusterHealthAction does not use the regular retry logic, possibly causing StackOverflowErrors. Relates #28169
This commit is contained in:
parent
71ba314c73
commit
0c4e2cbc19
|
@ -30,6 +30,7 @@ import org.elasticsearch.cluster.LocalClusterUpdateTask;
|
|||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateObserver;
|
||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.NotMasterException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
|
@ -125,7 +126,8 @@ public class TransportClusterHealthAction extends TransportMasterNodeReadAction<
|
|||
@Override
|
||||
public void onNoLongerMaster(String source) {
|
||||
logger.trace("stopped being master while waiting for events with priority [{}]. retrying.", request.waitForEvents());
|
||||
doExecute(task, request, listener);
|
||||
// TransportMasterNodeAction implements the retry logic, which is triggered by passing a NotMasterException
|
||||
listener.onFailure(new NotMasterException("no longer master. source: [" + source + "]"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue