Skip to content

feat(media): add sharded compatibility reads - #4015

Draft
bradseiler wants to merge 2 commits into
mainfrom
seiler/media-sharded-read
Draft

feat(media): add sharded compatibility reads#4015
bradseiler wants to merge 2 commits into
mainfrom
seiler/media-sharded-read

Conversation

@bradseiler

Copy link
Copy Markdown

Summary

Add deterministic hash-leading, community-scoped media key helpers and make every relay read/probe path prefer the sharded object while falling back to the legacy flat key only on absence. Public Blossom URLs and writes remain unchanged.

Related issue

None found; requested in the linked Buzz channel thread.

Testing

  • bin/cargo test -p buzz-media (110 passed, 1 live-MinIO test ignored)
  • bin/cargo test -p buzz-relay --lib handlers::imeta (11 passed)
  • bin/cargo clippy --workspace --all-targets -- -D warnings
  • bin/cargo fmt --check

Stack

  1. This PR: compatibility readers; safe to deploy with legacy writes.
  2. Upload-record and storage-index compatibility.
  3. Configurable legacy/dual/sharded writes.

Co-authored-by: npub128x7j3pwgm4vs8yra3c42fcgcwcvh94g3luwzkqa376du2q6l0esqcrwch <51cde9442e46eac81c83ec71552708c3b0cb96a88ff8e1581d8fb4de281afbf3@buzz.block.builderlab.xyz>
Signed-off-by: npub128x7j3pwgm4vs8yra3c42fcgcwcvh94g3luwzkqa376du2q6l0esqcrwch <51cde9442e46eac81c83ec71552708c3b0cb96a88ff8e1581d8fb4de281afbf3@buzz.block.builderlab.xyz>
Classify sharded payload keys in storage sweeps, preserve physical totals, and deduplicate logical legacy/sharded copies. Export read resolution, fallback, and duplicate-layout metrics.

Co-authored-by: npub128x7j3pwgm4vs8yra3c42fcgcwcvh94g3luwzkqa376du2q6l0esqcrwch <51cde9442e46eac81c83ec71552708c3b0cb96a88ff8e1581d8fb4de281afbf3@buzz.block.builderlab.xyz>
Signed-off-by: npub128x7j3pwgm4vs8yra3c42fcgcwcvh94g3luwzkqa376du2q6l0esqcrwch <51cde9442e46eac81c83ec71552708c3b0cb96a88ff8e1581d8fb4de281afbf3@buzz.block.builderlab.xyz>
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