Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
86db839d
Commit
86db839d
authored
May 24, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bf50c7a7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
go/zodb/storage/fs1/fs1tools/verify.go
go/zodb/storage/fs1/fs1tools/verify.go
+5
-5
No files found.
go/zodb/storage/fs1/fs1tools/verify.go
View file @
86db839d
...
@@ -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 data
base 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment