Skip to content

feat(encrypt):reduce encrypted temp-write metadata overhead by caching(url) temp-root readiness and turning the temp-file path into TTL fast path + NotFound fallback + AlreadyExists cleanup .#2933

Merged
qin-ctx merged 1 commit into
volcengine:mainfrom
baojun-zhang:encrypt-reduce
Jul 2, 2026

Conversation

@baojun-zhang

Copy link
Copy Markdown
Collaborator

Description

Reduce metadata overhead for encrypted temp writes by caching temp-root readiness and using a fast-path temp-file write flow with targeted fallback handling.

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Added a TTL-based temp-root readiness cache in EncryptionWrappedFS to avoid repeatedly preparing the encrypted temp root on every write.
  • Split deterministic temp path handling into encrypted_temp_root() and encrypted_temp_path(), and changed encrypted temp writes to use a fast path first.
  • Added fallback handling for NotFound and stale AlreadyExists temp files, plus cache pruning logic and regression coverage for stale temp replacement and temp-path mapping.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

…g temp-root readiness and turning the temp-file path into TTL fast path + NotFound fallback + AlreadyExists cleanup .
@qin-ctx qin-ctx merged commit c699144 into volcengine:main Jul 2, 2026
8 of 9 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants