Skip to content

Conversation

@original-brownbear
Copy link
Contributor

  • Reduce Numebr of List Calls During Snapshot Create and Delete

Some obvious cleanups I found when investigation the API call count
metering:

  • No need to get the latest generation id after loading latest
    repository data
    • Loading RepositoryData already requires fetching the latest
      generation so we can reuse it
  • Also, reuse list of all root blobs when fetching latest repo
    generation during snapshot delete like we do for shard folders
  • Lastly, don't try and load index--1 (N = -1) repository data, it
    doesn't exist -> just return the empty repo data initially

backport of #44088

…c#44088)

* Reduce Numebr of List Calls During Snapshot Create and Delete

Some obvious cleanups I found when investigation the API call count
metering:
* No need to get the latest generation id after loading latest
repository data
   * Loading RepositoryData already requires fetching the latest
generation so we can reuse it
* Also, reuse list of all root blobs when fetching latest repo
generation during snapshot delete like we do for shard folders
* Lastly, don't try and load `index--1` (N = -1) repository data, it
doesn't exist -> just return the empty repo data initially
@original-brownbear original-brownbear merged commit 51f0e94 into elastic:7.x Jul 11, 2019
@original-brownbear original-brownbear deleted the 44088-7.x branch July 11, 2019 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant