|
41 | 41 | import org.elasticsearch.common.inject.Inject;
|
42 | 42 | import org.elasticsearch.common.io.stream.StreamInput;
|
43 | 43 | import org.elasticsearch.common.io.stream.StreamOutput;
|
44 |
| -import org.elasticsearch.common.logging.DeprecationLogger; |
45 | 44 | import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
46 | 45 | import org.elasticsearch.common.util.concurrent.CountDown;
|
47 | 46 | import org.elasticsearch.index.Index;
|
|
72 | 71 | import java.util.List;
|
73 | 72 | import java.util.Map;
|
74 | 73 | import java.util.concurrent.ConcurrentMap;
|
75 |
| -import java.util.stream.StreamSupport; |
76 | 74 |
|
77 | 75 | public class SyncedFlushService implements IndexEventListener {
|
78 | 76 |
|
79 | 77 | private static final Logger logger = LogManager.getLogger(SyncedFlushService.class);
|
80 | 78 |
|
81 |
| - private static final DeprecationLogger DEPRECATION_LOGGER = new DeprecationLogger(logger); |
82 |
| - |
83 |
| - public static final String SYNCED_FLUSH_DEPRECATION_MESSAGE = |
84 |
| - "Synced flush is deprecated and will be removed in 8.0. Use flush at _/flush or /{index}/_flush instead."; |
85 |
| - |
86 | 79 | private static final String PRE_SYNCED_FLUSH_ACTION_NAME = "internal:indices/flush/synced/pre";
|
87 | 80 | private static final String SYNCED_FLUSH_ACTION_NAME = "internal:indices/flush/synced/sync";
|
88 | 81 | private static final String IN_FLIGHT_OPS_ACTION_NAME = "internal:indices/flush/synced/in_flight";
|
@@ -137,9 +130,6 @@ public void attemptSyncedFlush(final String[] aliasesOrIndices,
|
137 | 130 | IndicesOptions indicesOptions,
|
138 | 131 | final ActionListener<SyncedFlushResponse> listener) {
|
139 | 132 | final ClusterState state = clusterService.state();
|
140 |
| - if (StreamSupport.stream(state.nodes().spliterator(), false).allMatch(n -> n.getVersion().onOrAfter(Version.V_7_6_0))) { |
141 |
| - DEPRECATION_LOGGER.deprecatedAndMaybeLog("synced_flush", SYNCED_FLUSH_DEPRECATION_MESSAGE); |
142 |
| - } |
143 | 133 | final Index[] concreteIndices = indexNameExpressionResolver.concreteIndices(state, indicesOptions, aliasesOrIndices);
|
144 | 134 | final Map<String, List<ShardsSyncedFlushResult>> results = ConcurrentCollections.newConcurrentMap();
|
145 | 135 | int numberOfShards = 0;
|
|
0 commit comments