|
This version is still in development and is not considered stable yet. For the latest stable version, please use RIOT-X 1.15! |
Diff
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 diff command:
riotx diff SOURCE TARGET [OPTIONS]
diff was previously named compare. The compare command name, the --compare option and the RIOT_COMPARE environment variable are still accepted for backward compatibility.
|
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 --diff (--quick for diff 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.