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
0830f286
Commit
0830f286
authored
Mar 06, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f8bd9308
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
go/zodb/db.go
go/zodb/db.go
+4
-4
No files found.
go/zodb/db.go
View file @
0830f286
...
...
@@ -290,7 +290,7 @@ type hwaiter struct {
func
(
db
*
DB
)
headWait
(
ctx
context
.
Context
,
at
Tid
)
(
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"wait head ≥ %s"
,
at
)
// check if db is already down -> error even if at is under coverage
//
pre
check if db is already down -> error even if at is under coverage
if
ready
(
db
.
down
)
{
return
db
.
downErr
}
...
...
@@ -454,7 +454,7 @@ func (db *DB) open(at Tid, noPool bool) *Connection {
// Note: if new at is already covered by DB.Head Resync will be non-blocking
// operation. However if at is > current DB.Head Resync, similarly to DB.Open,
// will block waiting for DB.Head to become ≥ at.
func
(
conn
*
Connection
)
Resync
(
ctx
context
.
Context
,
at
Tid
)
error
{
func
(
conn
*
Connection
)
Resync
(
ctx
context
.
Context
,
at
Tid
)
(
err
error
)
{
if
!
conn
.
noPool
{
panic
(
"Conn.Resync: connection was opened without NoPool flag"
)
}
...
...
@@ -462,10 +462,10 @@ func (conn *Connection) Resync(ctx context.Context, at Tid) error {
panic
(
"Conn.Resync: resync to at=0 (auto-mode is valid only for DB.Open)"
)
}
// XXX err ctx? ("resync @at -> @at"
)
defer
xerr
.
Contextf
(
&
err
,
"resync @%s -> %s"
,
conn
.
at
,
at
)
// wait for db.Head ≥ at
err
:
=
conn
.
db
.
headWait
(
ctx
,
at
)
err
=
conn
.
db
.
headWait
(
ctx
,
at
)
if
err
!=
nil
{
return
err
}
...
...
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