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
0830f286
Commit
0830f286
authored
Mar 06, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f8bd9308
Changes
1
Hide 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