Skip to content

feat: add per-stream decrypt batch sizing#442

Open
mickvandijke wants to merge 1 commit into
WithAutonomi:masterfrom
mickvandijke:runtime-stream-decrypt-batch-size
Open

feat: add per-stream decrypt batch sizing#442
mickvandijke wants to merge 1 commit into
WithAutonomi:masterfrom
mickvandijke:runtime-stream-decrypt-batch-size

Conversation

@mickvandijke
Copy link
Copy Markdown
Contributor

Summary

  • add explicit per-stream decrypt batch-size APIs alongside the existing env-var default
  • keep the legacy streaming_decrypt wrapper behavior unchanged
  • bump self_encryption to 0.36.0 for the public API addition

Verification

  • cargo test

@mickvandijke mickvandijke force-pushed the runtime-stream-decrypt-batch-size branch from c45a4dd to 568d24d Compare May 13, 2026 09:16
@mickvandijke mickvandijke force-pushed the runtime-stream-decrypt-batch-size branch from 568d24d to 10508c0 Compare May 13, 2026 09:42
Copy link
Copy Markdown
Contributor

@dirvine dirvine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. I did a local review and validation of this PR and did not find any blocking issues.

Non-blocking notes I recommend fixing:

  • The new batch_size only affects sequential DecryptionStream iteration via fetch_next_batch. Random-access APIs such as get_range/range still fetch the full required chunk range in one call. That may be fine behaviorally, but the docs should clarify that this is iterator fetch batching only, or the batch-size behavior should be extended if callers are expected to rely on it for all streaming decrypt access paths.

  • The PR adds tests for explicit batch sizing and explicit zero rejection, but not for the legacy STREAM_DECRYPT_BATCH_SIZE env fallback when the value is invalid or 0. Since that fallback behavior changed, it should have regression coverage if feasible despite the LazyLock isolation wrinkle.

These are not merge blockers from my review, but I suggest addressing them before merge or in a prompt follow-up.

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.

2 participants