Skip to content

Commit e2448fd

Browse files
authored
Watcher - workaround for potential deadlock (#47603)
7.3.0 fixes this issue by changing the locking strategy in #41451. However, that change is not part of 6.x and the change here is a minimal workaround to prevent the potential of deadlock. This change will no longer retry failed bulk requests that go through the BulkProcessor for Watcher. Specifically this removes the retry logic when adding Watcher history and Triggered watches when the Bulk request failed. Related #47599
1 parent 261e79f commit e2448fd

File tree

1 file changed

+2
-0
lines changed
  • x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher

1 file changed

+2
-0
lines changed

x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.apache.logging.log4j.Logger;
1010
import org.elasticsearch.action.ActionRequest;
1111
import org.elasticsearch.action.ActionResponse;
12+
import org.elasticsearch.action.bulk.BackoffPolicy;
1213
import org.elasticsearch.action.bulk.BulkItemResponse;
1314
import org.elasticsearch.action.bulk.BulkProcessor;
1415
import org.elasticsearch.action.bulk.BulkRequest;
@@ -395,6 +396,7 @@ public void afterBulk(long executionId, BulkRequest request, Throwable failure)
395396
.setBulkActions(SETTING_BULK_ACTIONS.get(settings))
396397
.setBulkSize(SETTING_BULK_SIZE.get(settings))
397398
.setConcurrentRequests(SETTING_BULK_CONCURRENT_REQUESTS.get(settings))
399+
.setBackoffPolicy(BackoffPolicy.noBackoff())
398400
.build();
399401

400402
HistoryStore historyStore = new HistoryStore(bulkProcessor);

0 commit comments

Comments
 (0)