-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Description
Elasticsearch allows to fetch snapshot information in two different ways. Either a specific snapshot of a repository or a pattern can be specified, or info for all snapshots can be retrieved:
GET /_snapshot/my_backup/_all
Having S3 as the snapshot location this means 1 request to get the repository index file from S3 and 1 request for each snapshot. This means each time _all is called N+1 request are made to S3.
It would be nice to have an API endpoint the exposes the data from the S3 repository index file with all the snapshot in it. This would allow to implement a logic on the client side for which snapshots the detailed stats should be fetched.
An example use case would be a snapshot that is created every 30 minutes with snapshot-name-timestamp and now on the client side I would like to fetch the stats for the most recent snapshot. If I don't know the exact timestamp without the above API I would have to do N+1 requests to S3 which can become expensive. Otherwise I could do 1 request for the repository index and 1, sort the snapshot list on the client side and fetch stats for the first entry.
@abeyad FYI