Skip to content

Commit 2727980

Browse files
Remove Outdated Repo Cleanup BwC Check (#55504)
Master/8 won't connect to pre-7.4 ever so no need for this check.
1 parent 58b1b33 commit 2727980

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/cleanup/TransportCleanupRepositoryAction.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.apache.logging.log4j.LogManager;
2222
import org.apache.logging.log4j.Logger;
2323
import org.apache.logging.log4j.message.ParameterizedMessage;
24-
import org.elasticsearch.Version;
2524
import org.elasticsearch.action.ActionListener;
2625
import org.elasticsearch.action.ActionRunnable;
2726
import org.elasticsearch.action.StepListener;
@@ -73,8 +72,6 @@ public final class TransportCleanupRepositoryAction extends TransportMasterNodeA
7372

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

76-
private static final Version MIN_VERSION = Version.V_7_4_0;
77-
7875
private final RepositoriesService repositoriesService;
7976

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

148145
@Override
149146
protected void masterOperation(Task task, CleanupRepositoryRequest request, ClusterState state,
150-
ActionListener<CleanupRepositoryResponse> listener) {
151-
if (state.nodes().getMinNodeVersion().onOrAfter(MIN_VERSION)) {
152-
cleanupRepo(request.name(), ActionListener.map(listener, CleanupRepositoryResponse::new));
153-
} else {
154-
throw new IllegalArgumentException("Repository cleanup is only supported from version [" + MIN_VERSION
155-
+ "] but the oldest node version in the cluster is [" + state.nodes().getMinNodeVersion() + ']');
156-
}
147+
ActionListener<CleanupRepositoryResponse> listener) {
148+
cleanupRepo(request.name(), ActionListener.map(listener, CleanupRepositoryResponse::new));
157149
}
158150

159151
@Override

0 commit comments

Comments
 (0)