Commit 86db839d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent bf50c7a7
......@@ -39,8 +39,8 @@ import (
// Verify verifies content of a FileStorage file @ path.
//
// Only data part of the data base is verified (the *.fs file). Use
// VerifyIndexFor to verify the index part (*.fs.index).
// Only data part of the database is verified (the *.fs file).
// Use VerifyIndexFor to verify the index part (*.fs.index).
func Verify(w io.Writer, path string, verbose int, progress bool) (err error) {
// just iterate through the file and emit progress.
// the FileStorage driver implements all consistency checks by itself.
......@@ -83,7 +83,7 @@ func Verify(w io.Writer, path string, verbose int, progress bool) (err error) {
return Dump(w, path, fs1.IterForward, v)
}
// XXX
// Verifier implements Dumper that is used by Verify.
type Verifier struct {
ntxn int // current transaction record #
verbose int // >=1 (print txn) >=2 (print objects)
......@@ -92,7 +92,7 @@ type Verifier struct {
dhLoading fs1.DataHeader
donePos int64 // done verifying till this position
progress func(force bool) error
progress func(force bool) error // called after each transaction if !nil
}
func (v *Verifier) DumperName() string {
......@@ -169,7 +169,7 @@ const verifySummary = "verify database content"
func verifyUsage(w io.Writer) {
fmt.Fprintf(w,
`Usage: fs1 verify [options] <storage>
Dump transactions from a FileStorage XXX
Verify FileStorage records for consistency
<storage> is a path to FileStorage
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment