Skip to content

Commit

Permalink
Watcher - workaround for potential deadlock (#47603)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jakelandis authored Oct 7, 2019
1 parent 261e79f commit e2448fd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.apache.logging.log4j.Logger;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.action.bulk.BackoffPolicy;
import org.elasticsearch.action.bulk.BulkItemResponse;
import org.elasticsearch.action.bulk.BulkProcessor;
import org.elasticsearch.action.bulk.BulkRequest;
Expand Down Expand Up @@ -395,6 +396,7 @@ public void afterBulk(long executionId, BulkRequest request, Throwable failure)
.setBulkActions(SETTING_BULK_ACTIONS.get(settings))
.setBulkSize(SETTING_BULK_SIZE.get(settings))
.setConcurrentRequests(SETTING_BULK_CONCURRENT_REQUESTS.get(settings))
.setBackoffPolicy(BackoffPolicy.noBackoff())
.build();

HistoryStore historyStore = new HistoryStore(bulkProcessor);
Expand Down

0 comments on commit e2448fd

Please sign in to comment.