Sync
Sync commands let you inspect and move the local synchronization pipeline.
The command group is:
softadastra syncCommands
softadastra sync status
softadastra sync tickShow sync help
Run:
softadastra syncOutput:
Softadastra sync
Usage
softadastra sync status
softadastra sync tick
Commands
status Show sync engine state
tick Run one manual sync cycleCheck sync status
Use sync status to see what the local sync pipeline is tracking.
softadastra sync statusExample output:
Softadastra sync status
Metric Value
node_id node-1
outbox_size 1
queued_count 1
in_flight_count 0
acknowledged_count 0
failed_count 0
last_submitted_version 1
last_applied_remote_version 0
total_retries 0The exact numbers depend on what happened locally.
What the fields mean
outbox_size is the number of operations currently tracked for sync.
queued_count is the number of operations waiting to be selected for delivery.
in_flight_count is the number of operations currently being processed or waiting for acknowledgement.
acknowledged_count is the number of operations already acknowledged.
failed_count is the number of operations that failed according to the sync policy.
last_submitted_version is the latest local version submitted to sync.
last_applied_remote_version is the latest remote version applied locally.
total_retries is the total number of retry attempts recorded by sync.
Run one sync tick
Use sync tick to move sync forward once.
softadastra sync tickExample output:
Softadastra sync tick
Metric Value
retried_count 0
batch_size 1
connected_peers 0
sent_count 0
pruned_count 0
No connected transport peers available.A tick can retry expired work, produce a sync batch, and try to send that batch to connected transport peers.
What tick output means
retried_count is the number of expired operations retried during this tick.
batch_size is the number of operations selected for the next sync batch.
connected_peers is the number of connected transport peers available for delivery.
sent_count is the number of sync items the CLI attempted to send through transport.
pruned_count is the number of completed entries pruned during the tick.
No sync work
If there is nothing ready to send, sync tick can show:
No sync operations ready for delivery.That is not an error.
It only means the sync pipeline had no batch ready at that moment.
No connected peers
If a batch exists but no peer is connected, sync tick can show:
No connected transport peers available.That is also normal.
It means local sync work exists, but there is no connected transport peer to receive it yet.
Local data is still safe locally.
Sync after a local write
A simple sync test is:
softadastra store put message/1 hello
softadastra sync status
softadastra sync tick
softadastra sync statusWhat this does:
- writes a value locally
- checks what sync is tracking
- runs one manual sync cycle
- checks the state again
Sync does not require peers to exist
Softadastra is local-first.
This should work even when there are no peers:
softadastra store put draft/1 hello
softadastra store get draft/1
softadastra sync statusPeers only matter when the local node needs to send work to another node.
If no peer is connected, sync work can stay pending until delivery becomes possible.
Sync with peers
When peers are available, a useful flow is:
softadastra node start
softadastra peers
softadastra store put message/1 hello
softadastra sync status
softadastra sync tick
softadastra sync statusThis starts local node services, checks peers, writes a local value, then moves sync forward once.
Interactive mode
Inside interactive mode, do not repeat softadastra.
Start the CLI:
softadastraThen run:
softadastra> node start
softadastra> store put message/1 hello
softadastra> sync status
softadastra> sync tick
softadastra> sync status
softadastra> exitThis is useful because node services stay available while you run several commands in the same CLI session.
Common issues
Unknown sync command
If you run an unsupported sync command:
softadastra sync unknownThe CLI returns:
Unknown sync command: unknown
Usage: sync <status|tick>Use one of:
softadastra sync status
softadastra sync tickTick produced no batch
If batch_size is 0, there was no sync batch ready.
That can happen when there is no new local work.
Try:
softadastra store put message/1 hello
softadastra sync tickTick produced a batch but sent nothing
If batch_size is greater than 0 and sent_count is 0, there may be no connected transport peer.
Check peers:
softadastra peersThen check status:
softadastra statusFailed count is greater than zero
If failed_count is greater than zero, sync has operations that failed according to the current retry policy.
Check:
softadastra sync status
softadastra peers
softadastra statusA sync failure does not mean local data was deleted.
It means delivery or propagation failed.
Good first sync test
Run:
softadastra store put message/1 hello
softadastra store get message/1
softadastra sync status
softadastra sync tick
softadastra sync statusThis tests local write, local read, sync state, one manual tick, and sync state again.
Summary
Use:
softadastra sync statusto inspect sync state.
Use:
softadastra sync tickto run one manual sync cycle.
Sync is explicit. A local write can happen first, then sync can move that work later.
Next, continue with Peers.