Commit Graph
1 Commits
Author SHA1 Message Date
yetone e3f1efdaac usage: a message id's pairing key is 16 bytes, not 24
msgKeysOf keeps each chunk's message ids as hashes, with the row, for
every chunk a pairing reads. The key was two 64-bit hashes and an
int32, padded to 24 bytes. It is now a 64-bit and a 32-bit hash with
the row, 16 bytes: two of a long history's ~300k ids alike in all 96
bits is ~1e-18 likely.

Run on mote at this head:
- go test ./internal/usage: ok (28.8s)
- GOOS=darwin/linux/windows go vet ./internal/usage: ok
- gofmt -l: clean
- Broken by hand: with the second hash back at 64 bits,
  TestMsgKeySize is red (24 bytes).
- Real-account copy (~/r2278/acct), idle heap at 180s, v0.1.3404's
  tree vs this: appendMsgKeys 6.49 MB -> 3.69 MB, inuse 103.0 MB ->
  97.8 MB, Footprint 154 MB.
2026-11-09 19:58:17 +08:00