Documentation ¶
Overview ¶
Command kvaudit verifies kv databases.
Installation:
$ go get github.com/cznic/kv/kvaudit
Usage:
kvaudit [-d] [-f key] [-l key] [-max n] [-s] [-v] file
Options:
-b analyze allocated/free blocks sizes vs FLT buckets -d dump file to stdout in cdbmake[2] format even for empty -f and -l. -f key dump from key, first existing if empty -l key dump to key, last existing if empty -max maximum number of errors to report. Default 10. The actual number of reported errors, if any, may be less because many errors do not allow to reliably continue the audit. -s List DB statistics -v List every error in addition to the overall one.
Arguments:
file For example: ~/foo/bar.db
Implementation Notes ¶
The performed verification is described at [0]. This tool was hacked quickly to assist with resolving [1].
Known Issues ¶
In this first release there's no file locking checked or enforced. The auditing process will _not_ write to the DB, so this cannot introduce a DB corruption (it's opened in R/O mode anyway). However, if the DB is opened and updated by another process, the reported errors may be caused only by the updates.
In other words, to use this initial version properly, you must manually ensure that the audited database is not being updated by any other process.
Click to show internal directories.
Click to hide internal directories.