Skip to content
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

GET /_snapshot/_all/_all times out when there are no repositories #43547

Closed
jen-huang opened this issue Jun 24, 2019 · 2 comments · Fixed by #43558
Closed

GET /_snapshot/_all/_all times out when there are no repositories #43547

jen-huang opened this issue Jun 24, 2019 · 2 comments · Fixed by #43558
Assignees
Labels
>bug :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs

Comments

@jen-huang
Copy link

jen-huang commented Jun 24, 2019

Relates to changes in #42090

When there are no repositories, a request to GET /_snapshot/_all/_all returns a 504 timeout error.

I would expect this request to return [] (an empty array).

@jen-huang jen-huang added >bug :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs labels Jun 24, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@jen-huang jen-huang changed the title /_snapshot/_all/_all times out when there are no repositories GET /_snapshot/_all/_all times out when there are no repositories Jun 24, 2019
@original-brownbear
Copy link
Member

original-brownbear commented Jun 24, 2019

@andrershov I think we just need to short-circuit the listener in org.elasticsearch.action.admin.cluster.snapshots.get.TransportGetSnapshotsAction#getMultipleReposSnapshotInfo, instantiating a group action listener with count 0 (illegal argument) seems to be killing us here.

andrershov added a commit that referenced this issue Jun 25, 2019
When there are no repositories, a request to GET /_snapshot/_all/_all
returns a 504 timeout error.
This happens because try to create GroupedActionListener with the
size of zero, which leads to an exception.
This commit short-circuits if there are no repos and adds a test to
verify the fix.

Closes #43547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants