1.3.5.4 Record Synchronization

Whenever a new neighbor connection is formed, the initiating node begins record synchronization. Record synchronization ensures that both nodes in the connection have identical databases. There are three types of synchronization: Sync All, Time-based Sync, and Hash-based Sync.

Sync All (section 3.1.7.29) is used when a node first connects to the graph. Sync All sends all the records in the database from the existing node to the connecting node.

Time-based Sync (section 3.1.7.30) is used when a node re-connects to a graph, but already has an older copy of the database. Time-based Sync will send all records in the database that were created or modified after the time (peer time) at which the connecting node previously left the graph. A Time-based Sync is always followed by a Hash-based Sync.

Hash-based Sync (section 3.1.7.31) is used when a node is making an additional connection to the graph. In this case, it is expected that both nodes will have identical or nearly identical databases. A Hash-based Sync compares the databases using record hashes, and sends only those records that are found to be different or missing.