gabriel / musehub public
perf BREAKING fix/mwp-db-only-filter #1 / 1
gabriel · 71 days ago · Apr 12, 2026 · Diff

perf: MWP filter/push use single SQL IN — no per-object S3 HEAD requests

wire_filter_objects: one SELECT IN query, O(1) round-trips. wire_push_objects: one SELECT IN query for dedup, O(1) round-trips.

This matches how git's smart HTTP works: the server answers 'what refs do you have?' — it does not verify every object on every push. The push invariant (backend.put succeeds → DB row inserted) ensures that a DB record always means bytes exist in storage. No per-push storage verification needed.

The previous approach (parallel S3 HEAD requests in wire_filter_objects) turned every push into N × TLS round-trips to Cloudflare, making a 534-object push take 60+ seconds instead of <1s.

deploy/repair_objects.py handles the one-time staging data-loss repair: checks all DB records against actual storage, deletes orphaned rows so a normal push re-uploads the missing bytes.

sha256:3c9077aa4718d0762aab92978ad0edec924e97e3e8f3ea989026bfe88e37d44a sha
sha256:158e50bbd17a19eed9af014fb530a181ba37eead6f40127eb3519eb2fd971d21 snapshot
← Older Oldest on fix/mwp-db-only-filter
All commits
Newer → Latest on fix/mwp-db-only-filter

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:3c9077aa4718d0762aab92978ad0edec924e97e3e8f3ea989026bfe88e37d44a --body "your comment"