Skip to content

CLDSRV-1020: Improve KMS upfront decrypt with many parts - #6341

Open
BourgoisMickael wants to merge 7 commits into
development/7.10from
improvement/CLDSRV-1020-kms-upfront
Open

BourgoisMickael wants to merge 7 commits into
development/7.10from
improvement/CLDSRV-1020-kms-upfront

Conversation

@BourgoisMickael

@BourgoisMickael BourgoisMickael commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Describe the trade-off of upfront parallel KMS Decrypt before streaming parts done by:

pros cons
- return KMS error instead of success with socket closing mid-stream
- parallel queries instead of in series between each parts for faster overall streaming
for many parts:
- can delay time to first byte
- can flood the KMS, parallel should be limited
- can hold native memory, should be cleaned asap if not consumed (on error) without waiting for GC

  • Limit the number of parallel requests made to KMS
    Defaults to 100, with environment variable GET_OBJECT_MAX_PARALLEL_KMS_DECRYPT to override or skip upfront KMS decrypt
  • Cleanup crypto streams early on error
  • Unit tests

This fixes comments from this backport #6322

Provide an env var to override or skip.
Instead of synchronous callback that trigger stack overflow
with many parts in async 2.5 (branch 7.X and 8.X).

Also should be more optimized.
If only 1 of multiple parallel queries fails the objectGet,
cleanup early the decipher stream of other successful KMS queries
Those streams for cryptography can hold native C++ memory
for OpenSSL. It's good to release them early without
waiting for GC.
@bert-e

bert-e commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Hello bourgoismickael,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-1020 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 7.10.62

  • 7.70.78

  • 8.8.60

  • 9.0.38

  • 9.1.16

  • 9.2.44

  • 9.3.25

  • 9.4.10

  • 9.5.1

  • 9.6.0

Please check the Fix Version/s of CLDSRV-1020, or the target
branch of this pull request.

@BourgoisMickael
BourgoisMickael requested review from a team, anurag4DSB, jonathan-gramain, leif-scality and tcarmet and removed request for a team October 23, 2026 14:32
@bert-e

bert-e commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants