-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix: Downsample returns appropriate error when target index gets deleted unexpectedly. #138228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gmarouli
merged 5 commits into
elastic:main
from
gmarouli:fix-downsampled-being-deleted
Nov 19, 2025
Merged
Fix: Downsample returns appropriate error when target index gets deleted unexpectedly. #138228
gmarouli
merged 5 commits into
elastic:main
from
gmarouli:fix-downsampled-being-deleted
Nov 19, 2025
+119
−26
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
|
Hi @gmarouli, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
kkrik-es
approved these changes
Nov 19, 2025
Contributor
Author
|
Thank you @kkrik-es |
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
gmarouli
added a commit
to gmarouli/elasticsearch
that referenced
this pull request
Nov 19, 2025
…ted unexpectedly. (elastic#138228) (cherry picked from commit 14f5892) # Conflicts: # x-pack/plugin/downsample/src/test/java/org/elasticsearch/xpack/downsample/TransportDownsampleActionTests.java
gmarouli
added a commit
to gmarouli/elasticsearch
that referenced
this pull request
Nov 19, 2025
…ted unexpectedly. (elastic#138228) (cherry picked from commit 14f5892) # Conflicts: # x-pack/plugin/downsample/src/test/java/org/elasticsearch/xpack/downsample/TransportDownsampleActionTests.java
Contributor
Author
💔 Some backports could not be created
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
gmarouli
added a commit
to gmarouli/elasticsearch
that referenced
this pull request
Nov 19, 2025
…ted unexpectedly. (elastic#138228) (cherry picked from commit 14f5892) # Conflicts: # x-pack/plugin/downsample/src/test/java/org/elasticsearch/xpack/downsample/TransportDownsampleActionTests.java
gmarouli
added a commit
to gmarouli/elasticsearch
that referenced
this pull request
Nov 20, 2025
…ted unexpectedly. (elastic#138228) (cherry picked from commit 14f5892) # Conflicts: # x-pack/plugin/downsample/src/main/java/org/elasticsearch/xpack/downsample/TransportDownsampleAction.java # x-pack/plugin/downsample/src/test/java/org/elasticsearch/xpack/downsample/TransportDownsampleActionTests.java
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-backport
Automatically create backport pull requests when merged
backport pending
>bug
:StorageEngine/Downsampling
Downsampling (replacement for rollups) - Turn fine-grained time-based data into coarser-grained data
Team:StorageEngine
v8.19.8
v9.1.8
v9.2.2
v9.3.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Downsample transport action did not take into consideration the possibility of the target index being deleted when updating the downsample status. Although this is an unlikely event to happen without manual action, we should still return an appropriate error and not an NPE.
With this change, if someone deletes the target index after it was refreshed but before the downsample status has been updated they will receive the following error:
We also reduced the places where we called
recordSuccessMetrics. It was called also when we encountered a failure because we assumed that downsampling had successfully finished by then. However, if the index was deleted it would still count as a failure. I think it will be more clear to count as a success only when the transport action has successfully finished all processing steps.Fixes: #137761