Skip to content

Commit ccb3b74

Browse files
nik9000kcm
authored andcommitted
API: Drop deprecated methods from Retry (#33925)
We deprecated the `Retry.withBackoff` flavors with `Settings` in 6.5 because they were no longer needed. This drops them form 7.0.
1 parent 68a2088 commit ccb3b74

File tree

2 files changed

+4
-32
lines changed

2 files changed

+4
-32
lines changed

docs/reference/migration/migrate_7_0/java.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ appropriate request directly.
1818
* All classes present in `org.elasticsearch.search.aggregations.metrics.*` packages
1919
were moved to a single `org.elasticsearch.search.aggregations.metrics` package.
2020

21+
==== `Retry.withBackoff` methods with `Settings` removed
22+
23+
The variants of `Retry.withBackoff` that included `Settings` have been removed
24+
because `Settings` is no longer needed.

server/src/main/java/org/elasticsearch/action/bulk/Retry.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.apache.logging.log4j.LogManager;
2323
import org.elasticsearch.action.ActionListener;
2424
import org.elasticsearch.action.support.PlainActionFuture;
25-
import org.elasticsearch.common.settings.Settings;
2625
import org.elasticsearch.common.unit.TimeValue;
2726
import org.elasticsearch.common.util.concurrent.FutureUtils;
2827
import org.elasticsearch.rest.RestStatus;
@@ -61,21 +60,6 @@ public void withBackoff(BiConsumer<BulkRequest, ActionListener<BulkResponse>> co
6160
r.execute(bulkRequest);
6261
}
6362

64-
/**
65-
* Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception and delegates results to the
66-
* provided listener. Retries will be scheduled using the class's thread pool.
67-
* @param consumer The consumer to which apply the request and listener
68-
* @param bulkRequest The bulk request that should be executed.
69-
* @param listener A listener that is invoked when the bulk request finishes or completes with an exception. The listener is not
70-
* @param settings settings
71-
* @deprecated Prefer {@link #withBackoff(BiConsumer, BulkRequest, ActionListener)}. The {@link Settings} isn't used.
72-
*/
73-
@Deprecated
74-
public void withBackoff(BiConsumer<BulkRequest, ActionListener<BulkResponse>> consumer, BulkRequest bulkRequest,
75-
ActionListener<BulkResponse> listener, Settings settings) {
76-
withBackoff(consumer, bulkRequest, listener);
77-
}
78-
7963
/**
8064
* Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception. Retries will be scheduled using
8165
* the class's thread pool.
@@ -91,22 +75,6 @@ public PlainActionFuture<BulkResponse> withBackoff(BiConsumer<BulkRequest, Actio
9175
return future;
9276
}
9377

94-
/**
95-
* Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception. Retries will be scheduled using
96-
* the class's thread pool.
97-
*
98-
* @param consumer The consumer to which apply the request and listener
99-
* @param bulkRequest The bulk request that should be executed.
100-
* @param settings settings
101-
* @return a future representing the bulk response returned by the client.
102-
* @deprecated prefer {@link #withBackoff(BiConsumer, BulkRequest)}. The {@link Settings} isn't used.
103-
*/
104-
@Deprecated
105-
public PlainActionFuture<BulkResponse> withBackoff(BiConsumer<BulkRequest, ActionListener<BulkResponse>> consumer,
106-
BulkRequest bulkRequest, Settings settings) {
107-
return withBackoff(consumer, bulkRequest);
108-
}
109-
11078
static class RetryHandler implements ActionListener<BulkResponse> {
11179
private static final RestStatus RETRY_STATUS = RestStatus.TOO_MANY_REQUESTS;
11280
private static final Logger logger = LogManager.getLogger(RetryHandler.class);

0 commit comments

Comments
 (0)