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 e643a18
Browse filesBrowse the repository at this point in the historyBrowse files
Answering "what are this change's heads?" or "which statements are about
this revision?" would otherwise mean reading every record. The index keeps
each change's revisions and heads (more than one head is divergence),
statements by subject, and the order the node received its records in,
in one append-only file, index/log, made of checked frames.
Committing a batch appends its records' entries before publishing them,
and the batch sync makes them durable together, so indexing costs no sync
of its own. A mark appended afterwards, unsynced, says the batch was
published; opening the index checks the records of unmarked batches
against the store. Appenders cut off a frame a crash left partial, and
any other damage, or a missing index, rebuilds it from the store, keeping
the arrival order the old log still knows. Batches hold a shared lock
that a rebuild takes exclusively, so a rebuild never misses one.
DurableWrite gains sync_with, to sync a file written in place with a
batch. On Linux, batches of up to two files now sync each file at once
instead of with syncfs: a record and the index log would otherwise wait
on every other process's writes, which stalled single writes for up to a
second on a busy disk. The store rejects records that don't decode, which
the index couldn't use.
0 commit comments