-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
GetSnapshotsResponse should re-wrap failed exceptions so callsites are visible in the stacktrace #43462
Labels
:Distributed Coordination/Snapshot/Restore
Anything directly related to the `_snapshot/*` APIs
Team:Distributed (Obsolete)
Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
Comments
dakrone
added
the
:Distributed Coordination/Snapshot/Restore
Anything directly related to the `_snapshot/*` APIs
label
Jun 20, 2019
Pinging @elastic/es-distributed |
@dakrone Thanks for your analysis. Would you like to contribute a PR? |
I am willing to take this up |
@amogh-jrules if you'd like to submit a PR for this that would be great, check out our contributing document if you need assistance getting an environment set up. |
original-brownbear
added a commit
to original-brownbear/elasticsearch
that referenced
this issue
Nov 25, 2019
As asked for in elastic#43462. I think this is a worthwhile change if only to make tests easier to debug. Closes elastic#43462
rjernst
added
the
Team:Distributed (Obsolete)
Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
label
May 4, 2020
original-brownbear
added a commit
that referenced
this issue
Jun 24, 2021
This PR returns the get snapshots API to the 7.x format (and transport client behavior) and enhances it for requests that ask for multiple repositories. The changes for requests that target multiple repositories are: * Add `repository` field to `SnapshotInfo` and REST response * Add `failures` map alongside `snapshots` list instead of returning just an exception response as done for single repo requests * Pagination now works across repositories instead of being per repository for multi-repository requests closes #69108 closes #43462
original-brownbear
added a commit
to original-brownbear/elasticsearch
that referenced
this issue
Jun 29, 2021
This PR returns the get snapshots API to the 7.x format (and transport client behavior) and enhances it for requests that ask for multiple repositories. The changes for requests that target multiple repositories are: * Add `repository` field to `SnapshotInfo` and REST response * Add `failures` map alongside `snapshots` list instead of returning just an exception response as done for single repo requests * Pagination now works across repositories instead of being per repository for multi-repository requests closes elastic#69108 closes elastic#43462
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore
Anything directly related to the `_snapshot/*` APIs
Team:Distributed (Obsolete)
Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
From the following code:
elasticsearch/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java
Lines 156 to 166 in f879e84
It's possible for snapshot exceptions to be generated on a different line than where they are actually thrown, for example, code that prior to #42090 worked like this:
Now fails.
The exception is generated from the
snaps.getSnapshots(repo)
call above, however, the stacktrace for the exception actually traces back to the linewhich is very confusing, because that line itself is wrapped in a try/catch.
GetSnapshotsResponse
should change this line:elasticsearch/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java
Line 165 in f879e84
Into something like
So that the stacktrace correctly identifies the caller.
The text was updated successfully, but these errors were encountered: