meta: add Af2Desc metadata storer for CDM SDFS AF2 DESC attribute#2
Open
riaarora-boop wants to merge 1 commit into
Open
meta: add Af2Desc metadata storer for CDM SDFS AF2 DESC attribute#2riaarora-boop wants to merge 1 commit into
riaarora-boop wants to merge 1 commit into
Conversation
Implements Af2Desc, a MetadataStorer that packs must-store S3 object metadata (etag, content-type, user metadata) into the single AF2 DESC file attribute (sdfs_af2_file_desc xattr) so it rides the AF2 partition snapshot. Serves reads from a write-through in-process cache because SDFS cannot read xattrs back after write. Exposes --af2-desc and --af2-desc-max-bytes flags on the posix subcommand. Mutually exclusive with --sidecar and --nometa. Jira: CDM-557243 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.
Summary:
Adds
Af2Desc, a newMetadataStorerimplementation for CDM SDFS. It packs must-store S3 object metadata (etag, content-type, content-encoding, user metadata, etc.) into the singlesdfs_af2_file_descxattr so it rides the AF2 partition snapshot alongside the object data.Key design points:
sdfs_af2_file_desckey works on SDFS FUSE — generic xattr keys are rejected andgetxattris unimplemented.Af2Descpacks all metadata into one JSON blob under this key.ErrNoSuchKey, which callers already handle as "empty."Exposes
--af2-descand--af2-desc-max-bytesflags on theposixsubcommand. Mutually exclusive with--sidecarand--nometa.Test Plan:
go test ./backend/meta/...passes (unit tests cover store/retrieve/delete/rename/cache invalidation on a normal xattr-capable filesystem)sdfs_af2_file_desckey succeeds; withuser.prefix returnsENOTSUPJIRA Issues:
CDM-557243 (subtask of CDM-557238)
Revert Plan:
Revert this PR.
--af2-descdefaults to false so existing deployments using xattr or sidecar are unaffected.