Compare

Once replication is complete, RIOT-X performs a verification step by reading keys in the source database and comparing them against the target database.

The verification step happens automatically after the scan is complete (snapshot replication), or for live replication when keyspace notifications have become idle.

Verification can also be run on-demand using the compare command:

riotx compare SOURCE TARGET [OPTIONS]

The output looks like this:

Verification failed (type: 225,062, missing: 485,450)
missing

Number of keys in source but not in target.

type

Number of keys with mismatched types (e.g. hash vs string).

value

Number of keys with mismatched values.

ttl

Number of keys with mismatched TTL i.e. difference is greater than tolerance (can be specified with --ttl-tolerance).

There are 2 comparison modes available through --compare (--quick for compare command):

Quick (default)

Compare key types and TTLs.

Full

Compare key types, TTLs, and values.

To show which keys differ, use the --show-diffs option.