Skip to main content

Module sync_store

Module sync_store 

Source
Expand description

The Vault’s sync rules applied to the store: an entry’s link ids and the activity lines other machines made. The rules are sync_links and sync_activity; this is what reads and writes the tables they decide for.

Functions§

apply_activity
Adds the activity line machine machine made as its number seq, unless this machine already has it. The line goes in the table of other machines’ lines, outside this machine’s hash chain.
apply_links
Takes the link ids a record for entry_id carries (EntryBody::link_ids): what this machine had plus the ids it did not, except those another entry holds or a removed entry had. Returns the ids the entry has now.
links_of
The link ids entry_id has here: the one this machine gave it, and its aliases.