Fix worker fallback#3
Open
yangyang233333 wants to merge 3 commits into
Open
Conversation
FallbackFsReader now carries is_fs_mode and only runs the UFS consistency check (ufs_mtime/len) before falling back in FsMode, where Curvine is authoritative and UFS is a flushed copy. In CacheMode, S3/UFS is authoritative: read S3 directly at the current pos with no validation and no seek clamping -- an out-of-range pos surfaces the underlying error to the caller. Add CacheMode fallback integration tests (require UFS_TEST_PATH): - TC-17: S3 shrunk, pos 0 -> reads current (shorter) S3 content - TC-18: S3 shrunk past pos -> Invalid seek position error - TC-19: S3 unchanged, worker down -> transparent fallback - TC-20: S3 grown, pos 0 -> reads current (longer) S3 content
yangyang233333
force-pushed
the
fix-worker-fallback
branch
from
July 1, 2026 10:24
06d01e2 to
2c3cce2
Compare
…llback Addresses review feedback on PR CurvineIO#963. After a CacheMode fallback switches to ufs_reader, len() kept returning the cached Curvine length from cv_reader, so len()-based callers (e.g. read_as_string) would stop at the stale length when S3 changed out-of-band. len() now delegates to the active ufs_reader once fallback has happened in CacheMode (S3 is authoritative). FsMode keeps Curvine as the metadata authority, matching the existing status()/len() intent. Add TC-21: after CacheMode fallback on a grown S3 object, len() must report the current (longer) length.
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.
No description provided.