Skip to main content

Module commit_log

Module commit_log 

Expand description

The action log: the index this endpoint builds as changes and commits arrive, answering which actions wrote a resource and which action a change belongs to.

A commit is the one record of an action (collab_types::WorkspaceCommit); the changes it names carry what the action did. The log is neither: it is the index over both, derived from them, so a peer reconstructs it from the changes and commits it holds and losing it costs a rebuild, never a record.

Two queries read it. CommitLog::history_of answers a resource’s history from that resource’s own entry and the actions it names, never the workspace’s whole log, so a workspace with a hundred thousand actions answers as fast as one with ten. CommitLog::action_of answers with the whole action a change belongs to — every unit it wrote — which is what undo takes back.

A change tells the index what the commit cannot: its own history entry names the resource it wrote and when. ChangeFact is that, read from the change.

Structs§

ChangeFact
One change of an action, as the log indexes it: the unit it belongs to, the resource its own history entry names, and when it was made.
CommitHistory
One action, as history reads it.
CommitLog
The actions this endpoint kept, and the index their queries read.