CommitSynchronizer

class dsviper.CommitSynchronizer(source, target, mode='Sync', size_of_packed_blobs=25000000)

Bases: object

Synchronizes two concrete databases through the CommitDatabasing interface (low-level driver interface).

MODE_FETCH = 'Fetch'
MODE_PUSH = 'Push'
MODE_SYNC = 'Sync'
mode() → str

Return which way data moves - Fetch carries source into target, Push carries target into source, and Sync runs both.

size_of_packed_blobs() → int

Return the size in bytes of the blob smaller blobs are packed into.

source() → CommitDatabasing

Return the CommitDatabasing interface for the source.

sync(logging: Logging | None = None) → CommitSynchronizerInfo

Carry the commits and blobs missing on either side, as the mode allows.

Compares nothing when neither side’s data_version() moved since the last call, as CommitSynchronizerInfo.need_transmit states. logging receives the progress; pass None to stay silent.

target() → CommitDatabasing

Return the CommitDatabasing interface for the target.