Skip to content

Fix worker fallback#3

Open
yangyang233333 wants to merge 3 commits into
mainfrom
fix-worker-fallback
Open

Fix worker fallback#3
yangyang233333 wants to merge 3 commits into
mainfrom
fix-worker-fallback

Conversation

@yangyang233333

Copy link
Copy Markdown
Owner

No description provided.

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
…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.
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.

1 participant