Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,6 @@ tests:
- class: org.elasticsearch.xpack.ml.integration.ClassificationIT
method: testWithOnlyTrainingRowsAndTrainingPercentIsFifty_DependentVariableIsBoolean
issue: https://github.com/elastic/elasticsearch/issues/121680
- class: org.elasticsearch.xpack.downsample.DownsampleActionSingleNodeTests
method: testDuplicateDownsampleRequest
issue: https://github.com/elastic/elasticsearch/issues/122158
- class: org.elasticsearch.search.SearchCancellationIT
method: testCancelFailedSearchWhenPartialResultDisallowed
issue: https://github.com/elastic/elasticsearch/issues/121719
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ public void testDuplicateDownsampleRequest() throws Exception {
new Thread(() -> {
try {
downsample(sourceIndex, targetIndex, config);
} catch (ResourceAlreadyExistsException e) {
} catch (ElasticsearchException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A persistent task with the same id/name should result in a ResourceAlreadyExistsException. However maybe it is wrapped in another exception and that is why the test failed. I think just catching a parent exception is ok here. We could also maybe unwrap the cause? (ExceptionsHelper)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log shows that actually both tasks ran, somehow.. The exception is from the second task failing to write to the target index, as it's marked as read-only by the first one after populating it. I'm not sure how it is possible to have both tasks to run, couldn't reproduce it.

firstFailed.set(true);
} finally {
downsampleComplete.countDown();
Expand All @@ -1770,7 +1770,7 @@ public void testDuplicateDownsampleRequest() throws Exception {
new Thread(() -> {
try {
downsample(sourceIndex, targetIndex, config);
} catch (ResourceAlreadyExistsException e) {
} catch (ElasticsearchException e) {
secondFailed.set(true);
} finally {
downsampleComplete.countDown();
Expand Down