Skip to content

Commit

Permalink
Remove Outdated Repo Cleanup BwC Check (#55504)
Browse files Browse the repository at this point in the history
Master/8 won't connect to pre-7.4 ever so no need for this check.
  • Loading branch information
original-brownbear authored Apr 21, 2020
1 parent 58b1b33 commit 2727980
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage;
import org.elasticsearch.Version;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.ActionRunnable;
import org.elasticsearch.action.StepListener;
Expand Down Expand Up @@ -73,8 +72,6 @@ public final class TransportCleanupRepositoryAction extends TransportMasterNodeA

private static final Logger logger = LogManager.getLogger(TransportCleanupRepositoryAction.class);

private static final Version MIN_VERSION = Version.V_7_4_0;

private final RepositoriesService repositoriesService;

private final SnapshotsService snapshotsService;
Expand Down Expand Up @@ -147,13 +144,8 @@ protected CleanupRepositoryResponse read(StreamInput in) throws IOException {

@Override
protected void masterOperation(Task task, CleanupRepositoryRequest request, ClusterState state,
ActionListener<CleanupRepositoryResponse> listener) {
if (state.nodes().getMinNodeVersion().onOrAfter(MIN_VERSION)) {
cleanupRepo(request.name(), ActionListener.map(listener, CleanupRepositoryResponse::new));
} else {
throw new IllegalArgumentException("Repository cleanup is only supported from version [" + MIN_VERSION
+ "] but the oldest node version in the cluster is [" + state.nodes().getMinNodeVersion() + ']');
}
ActionListener<CleanupRepositoryResponse> listener) {
cleanupRepo(request.name(), ActionListener.map(listener, CleanupRepositoryResponse::new));
}

@Override
Expand Down

0 comments on commit 2727980

Please sign in to comment.