|
21 | 21 | import org.apache.logging.log4j.LogManager; |
22 | 22 | import org.apache.logging.log4j.Logger; |
23 | 23 | import org.apache.logging.log4j.message.ParameterizedMessage; |
24 | | -import org.elasticsearch.Version; |
25 | 24 | import org.elasticsearch.action.ActionListener; |
26 | 25 | import org.elasticsearch.action.ActionRunnable; |
27 | 26 | import org.elasticsearch.action.StepListener; |
@@ -73,8 +72,6 @@ public final class TransportCleanupRepositoryAction extends TransportMasterNodeA |
73 | 72 |
|
74 | 73 | private static final Logger logger = LogManager.getLogger(TransportCleanupRepositoryAction.class); |
75 | 74 |
|
76 | | - private static final Version MIN_VERSION = Version.V_7_4_0; |
77 | | - |
78 | 75 | private final RepositoriesService repositoriesService; |
79 | 76 |
|
80 | 77 | private final SnapshotsService snapshotsService; |
@@ -147,13 +144,8 @@ protected CleanupRepositoryResponse read(StreamInput in) throws IOException { |
147 | 144 |
|
148 | 145 | @Override |
149 | 146 | 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)); |
157 | 149 | } |
158 | 150 |
|
159 | 151 | @Override |
|
0 commit comments