fix(layers/foyer): preserve read args while filling full-object cache#7718
Open
tonghuaroot wants to merge 1 commit into
Open
fix(layers/foyer): preserve read args while filling full-object cache#7718tonghuaroot wants to merge 1 commit into
tonghuaroot wants to merge 1 commit into
Conversation
The full-object cache fill called `stat` and `read` with default args, so versioned and conditional reads stored latest content under a versioned cache key. Derive the stat args from the reader's `OpRead` and pass the original read args, matching the fallback paths. Closes apache#7686
Contributor
Author
|
The failing HDFS behavior test looks unrelated to this change (it only touches FoyerLayer) — likely the same flakiness as #7577. Could a maintainer retrigger the job? |
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.
Which issue does this PR close?
Closes #7686.
Rationale for this change
FullReader::read_full_objectfilled the full-object cache withstat(OpStat::default())andread(OpRead::default()), dropping the reader'sOpRead. A versioned read then fetched and cached latest content under a versioned key, and conditional options (if_match, ...) were bypassed on the cache-fill path. The fallback paths already useself.args.clone(); this aligns the cache-fill path with them.What changes are included in this PR?
readnow uses the reader'sOpReadinstead of the default.statderives its conditions (version, if-match, if-none-match, if-modified-since, if-unmodified-since) from the reader'sOpRead.test_cache_fill_preserves_read_args, which fails on the old default-args path and verifies the inner accessor observes version andif_match.Are there any user-facing changes?
No public API change. The full-object cache now honors versioned and conditional read semantics on cache miss.