jetstream v2 in zig stream.waow.tech

seal: right-size per-block DID blooms to actual block cardinality (upstream f02919c)

Per-block blooms were sized for the 4096-event block cap; real blocks hold 1-3 unique DIDs, making the resident bloom region ~90% of server heap (53.6 GiB observed). Port upstream's fix: the footer builder sizes every per-block bloom to the segment's max per-block unique-DID count (clamped >= 1), keeping the equal-size region invariant; the region header is self-describing, so legacy fixed-size segments coexist with no format change. The rewrite path already right-sized; its redundant event-count bound moves into the builder. Regression test asserts a cardinality-1 segment's blooms are >10x smaller than cap-sized ones with unchanged lookup behavior.


Author
Date Commit Parent 0a4ce50d
+102 -11
4 changed files
+102 -11
4 changed files