Skip to content

Commit

Permalink
[TEST] ignore transient error in overlapping downsample (#108001)
Browse files Browse the repository at this point in the history
* Add retries in concurrent downsampling action

* [TEST] ignore transient error in overlapping downsample
  • Loading branch information
kkrik-es committed Apr 29, 2024
1 parent 4b5c5e2 commit 89a6c7e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,13 @@ public void onFailure(Exception e) {
}
});

// Downsample with retries, in case the downsampled index is not ready.
assertBusy(() -> downsample(sourceIndex, downsampleIndex, config), 120, TimeUnit.SECONDS);
assertBusy(() -> {
try {
client().execute(DownsampleAction.INSTANCE, new DownsampleAction.Request(sourceIndex, downsampleIndex, TIMEOUT, config));
} catch (ElasticsearchException e) {
fail("transient failure due to overlapping downsample operations");
}
});

// We must wait until the in-progress downsample ends, otherwise data will not be cleaned up
assertBusy(() -> assertTrue("In progress downsample did not complete", downsampleListener.success), 60, TimeUnit.SECONDS);
Expand Down

0 comments on commit 89a6c7e

Please sign in to comment.