[Storage] Cache encryption key if high level api spans across multiple service calls.#22069
Merged
kasobol-msft merged 3 commits intoAzure:mainfrom Jun 23, 2021
Merged
[Storage] Cache encryption key if high level api spans across multiple service calls.#22069kasobol-msft merged 3 commits intoAzure:mainfrom
kasobol-msft merged 3 commits intoAzure:mainfrom
Conversation
Contributor
Author
|
/azp run net - storage - tests |
|
Azure Pipelines failed to run 1 pipeline(s). |
Contributor
Author
|
/azp run net - storage - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
seanmcc-msft
approved these changes
Jun 22, 2021
jaschrep-msft
approved these changes
Jun 22, 2021
kasobol-msft
added a commit
that referenced
this pull request
Jun 23, 2021
…e service calls. (#22069) * this test catches the problem. * cache the content key. * changelog.
kasobol-msft
added a commit
that referenced
this pull request
Jun 23, 2021
* [Storage] Cache encryption key if high level api spans across multiple service calls. (#22069) * this test catches the problem. * cache the content key. * changelog. * prep release. (#22072) * Increment version for storage releases (#22081) Increment package version after release of Azure.Storage.Blobs Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When user is using client side encryption and uses relatively small buffer to perform download/openread operations then this puts unnecessary pressure on keyvault because we'd call to unwrap encryption key for each chunk.
For example OpenRead for 4GB blob and reading it's content will issue ~1000 unwrap requests as openread uses 4MB buffer by default.
This PR has optimization that caches encryption key for the lifespan of DownloadTo and Stream returned from OpenRead to avoid this.