feat(cache): support manifest file cache#345
Open
gripleaf wants to merge 1 commit into
Open
Conversation
6e8e3cd to
7b71e6d
Compare
7b71e6d to
805c2e3
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.
Purpose
Add an optional process-local manifest file bytes cache to reduce repeated manifest file reads during scan/planning paths.
This change:
manifest.cache-max-memory-size, defaulting to64MB;0disables the cache.CacheManagerto cache raw manifest file bytes.CoreOptions,ManifestList,ManifestFile, andIndexManifestFile.MemorySegmentInputStream, which keeps the underlyingMemorySegmentalive without copying bytes.IOHookis active so fault-injection tests still exercise real IO.Tests
git diff --check HEAD~1 HEADcmake -S . -B /tmp/paimon-cpp-manifest-cache-build -DPAIMON_BUILD_TESTS=ON -DPAIMON_DEPENDENCY_SOURCE=AUTO ...Added/updated UT coverage:
CoreOptionsTest64MBmanifest.cache-max-memory-size=0disables the cacheManifestFileTest.TestReadUsesManifestCacheManifestFileTest.TestManifestCacheCanBeDisabledManifestFileTest.TestManifestCacheBypassesWhenIOHookActiveIOHookis activeNote: local
paimon-core-testbuild was blocked by third-party dependency downloads because the configured proxy could not connect to GitHub.API and Format
This change adds a new public table option:
manifest.cache-max-memory-sizeIt does not change storage format or protocol compatibility. The cache stores raw manifest file bytes in process memory only.
Documentation
Yes. Added
docs/source/user_guide/manifest_cache.rstand linked it from the user guide.Generative AI tooling
Generated-by: OpenAI Codex