Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
4a57fffd
Commit
4a57fffd
authored
7 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
719d8005
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
go/zodb/storage/fs1/fs1tools/index.go
go/zodb/storage/fs1/fs1tools/index.go
+21
-1
No files found.
go/zodb/storage/fs1/fs1tools/index.go
View file @
4a57fffd
...
...
@@ -181,7 +181,7 @@ func verifyIdxMain(argv []string) {
storPath
:=
argv
[
0
]
// progress display
progress
:=
func
(
p
*
fs1
.
IndexVerifyProgress
)
{
display
:=
func
(
p
*
fs1
.
IndexVerifyProgress
)
{
if
p
.
TxnTotal
==
-
1
{
bytesChecked
:=
p
.
Index
.
TopPos
-
p
.
Iter
.
Txnh
.
Pos
bytesAll
:=
p
.
Index
.
TopPos
...
...
@@ -196,14 +196,34 @@ func verifyIdxMain(argv []string) {
}
}
// display updates once per tick
tick
:=
time
.
NewTicker
(
time
.
Second
/
4
)
defer
tick
.
Stop
()
var
lastp
*
fs1
.
IndexVerifyProgress
progress
:=
func
(
p
*
fs1
.
IndexVerifyProgress
)
{
lastp
=
p
select
{
case
<-
tick
.
C
:
default
:
return
}
display
(
p
)
}
if
quiet
{
progress
=
nil
}
err
:=
VerifyIndexFor
(
context
.
Background
(),
storPath
,
ntxn
,
progress
)
if
!
quiet
{
// (re-)display last update in case no progress was displayed so far
display
(
lastp
)
fmt
.
Println
()
}
if
err
!=
nil
{
zt
.
Fatal
(
err
)
}
...
...
This diff is collapsed.
Click to expand it.
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