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

.

parent bf50c7a7
...@@ -39,8 +39,8 @@ import ( ...@@ -39,8 +39,8 @@ import (
// Verify verifies content of a FileStorage file @ path. // Verify verifies content of a FileStorage file @ path.
// //
// Only data part of the data base is verified (the *.fs file). Use // Only data part of the database is verified (the *.fs file).
// VerifyIndexFor to verify the index part (*.fs.index). // Use VerifyIndexFor to verify the index part (*.fs.index).
func Verify(w io.Writer, path string, verbose int, progress bool) (err error) { func Verify(w io.Writer, path string, verbose int, progress bool) (err error) {
// just iterate through the file and emit progress. // just iterate through the file and emit progress.
// the FileStorage driver implements all consistency checks by itself. // 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) { ...@@ -83,7 +83,7 @@ func Verify(w io.Writer, path string, verbose int, progress bool) (err error) {
return Dump(w, path, fs1.IterForward, v) return Dump(w, path, fs1.IterForward, v)
} }
// XXX // Verifier implements Dumper that is used by Verify.
type Verifier struct { type Verifier struct {
ntxn int // current transaction record # ntxn int // current transaction record #
verbose int // >=1 (print txn) >=2 (print objects) verbose int // >=1 (print txn) >=2 (print objects)
...@@ -92,7 +92,7 @@ type Verifier struct { ...@@ -92,7 +92,7 @@ type Verifier struct {
dhLoading fs1.DataHeader dhLoading fs1.DataHeader
donePos int64 // done verifying till this position 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 { func (v *Verifier) DumperName() string {
...@@ -169,7 +169,7 @@ const verifySummary = "verify database content" ...@@ -169,7 +169,7 @@ const verifySummary = "verify database content"
func verifyUsage(w io.Writer) { func verifyUsage(w io.Writer) {
fmt.Fprintf(w, fmt.Fprintf(w,
`Usage: fs1 verify [options] <storage> `Usage: fs1 verify [options] <storage>
Dump transactions from a FileStorage XXX Verify FileStorage records for consistency
<storage> is a path to FileStorage <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