You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f357911
Browse filesBrowse the repository at this point in the historyBrowse files
gluck
committed
store: ReadPage on a raw log reads the page, not the log
xwalLog.ReadPage was readPage(l.Read(), ...): it decoded every record in the
channel to return n of them. Every caller asking for "the last record" was
walking the whole conversation, while the comments beside them said it cost
one read: the dormant reader's tail probe (on every read of a dormant aria),
the agent's, the IR door's pages, the composed cache's seed and bracket reads
of an ancestor. The aria's own log is a tree log in front of the same channel
and delegates ReadPage to it, so it paid the same.
The channel is addressed by its own LT, so the window is arithmetic on the
bounds: backward from before-1 until n records are found, forward from
max(first, from). A record that does not read is skipped as Read skipped it,
so the page reaches past it exactly as the slice did. total is the channel's
extent, as Len reports it and as the tree log already returned.
TestReadPageByPositionMatchesTheSlice asks every (from, before, n) shape of
every aria in random fork chains, raw and through the aria's log, against
readPage over Read(); two off-by-one breakages were canaried and caught.
BenchmarkReadPage: a tail read is ~18-20 us at 300 records and at 3000.
TurnAtLT and the lineage probe keep their positional reads; their comments no
longer cite this bug.
0 commit comments