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
feat(btree)!: carry inline values as Bytes end to end
BREAKING: `put_batch` takes `Vec<(Bytes, Bytes)>` and `bulk_load` /
`BulkLoader::push` take their values as `Bytes`.
`LeafValue::Inline` held a `Vec<u8>`, so every hop between pages copied the
value even when nothing about it changed. A repack reads each record out of one
page and stages it into another; a history relocation and a rekey do the same.
With the read side already producing `Bytes`, each of those boundaries had to
copy back down to `Vec<u8>` purely to satisfy the type.
Hold it as `Bytes` instead. Values now move by refcount from the page they were
read out of, through the scan, into the loader staging the page they are
written to. Reads of an uncommitted or dirty leaf stop copying as well: they
share what the leaf already holds.
`put_batch` takes the row shape the scans return, so read output feeds straight
back in without a conversion — the asymmetry only existed because the two sides
were changed at different times.
Keys are untouched: prefix compression means a full key is not contiguous in
the page, so a record owns its key either way.
Bulk load allocates 1885 -> 1646 bytes per row.
`PageGuard::body` also stops copying, which it only did because the buffer
behind it used to be a `Vec`.
0 commit comments