object: reuse encrypted data across put retries - #7396
Open
Light-City wants to merge 1 commit into
Open
Light-City wants to merge 1 commit into
Light-City wants to merge 1 commit into
Conversation
Light-City
force-pushed
the
fix/encrypted-put-retry
branch
2 times, most recently
from
August 13, 2026 14:56
3b1dd9a to
b2214e0
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7396 +/- ##
==========================================
- Coverage 56.32% 55.07% -1.25%
==========================================
Files 177 139 -38
Lines 59011 48866 -10145
==========================================
- Hits 33236 26913 -6323
+ Misses 22259 19041 -3218
+ Partials 3516 2912 -604 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Light-City
force-pushed
the
fix/encrypted-put-retry
branch
from
August 13, 2026 15:28
b2214e0 to
c31a5f7
Compare
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.
1.Why and Backgroud?
cachedStore.uploadretries failed object uploads by callingObjectStorage.Putagain. For encrypted storage, each attempt previously reread and re-encrypted the same data block, generating a new data key, nonce, and ciphertext. This introduced unnecessary CPU and memory overhead, especially when timed-out attempts overlapped with subsequent retries.related issue: #7325
2.How to fix?
This change creates a request-scoped context shared by all attempts of one logical Put.
encrypted.Putencrypts the payload once and reuses the prepared ciphertext for subsequent attempts, with synchronization for overlapping retries and isolation between different encryption instances. Regular Put calls without this context keep their existing behavior, and storage wrappers require no additional interfaces as long as they propagate the context.