Skip to content
Prev Previous commit
Next Next commit
Rename request field to masterTimeout
  • Loading branch information
nielsbauman committed Nov 21, 2024
commit 6fc9f81d29ceb4ad348e9ada3a8bece2c0d17afc
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@
*/
public abstract class LocalClusterStateRequest extends ActionRequest {

private final TimeValue clusterUpdateTimeout;

protected LocalClusterStateRequest(TimeValue clusterUpdateTimeout) {
this.clusterUpdateTimeout = Objects.requireNonNull(clusterUpdateTimeout);
/**
* The timeout for waiting until the cluster is unblocked.
* We use the name <code>masterTimeout</code> to be consistent with the master node actions.
*/
private final TimeValue masterTimeout;

protected LocalClusterStateRequest(TimeValue masterTimeout) {
this.masterTimeout = Objects.requireNonNull(masterTimeout);
}

@Override
public void writeTo(StreamOutput out) throws IOException {
TransportAction.localOnly();
}

public TimeValue clusterUpdateTimeout() {
return clusterUpdateTimeout;
public TimeValue masterTimeout() {
return masterTimeout;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void waitForClusterUnblock(
var observer = new ClusterStateObserver(
initialState,
clusterService,
request.clusterUpdateTimeout(),
request.masterTimeout(),
logger,
clusterService.threadPool().getThreadContext()
);
Expand Down