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
2f8be58f
Commit
2f8be58f
authored
Mar 05, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
688c2f87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
go/zodb/db.go
go/zodb/db.go
+2
-2
No files found.
go/zodb/db.go
View file @
2f8be58f
...
@@ -359,7 +359,7 @@ func (db *DB) Open(ctx context.Context, opt *ConnOptions) (_ *Connection, err er
...
@@ -359,7 +359,7 @@ func (db *DB) Open(ctx context.Context, opt *ConnOptions) (_ *Connection, err er
db
.
mu
.
Lock
()
// unlocked in *DBUnlock
db
.
mu
.
Lock
()
// unlocked in *DBUnlock
// wait for δtail.head ≥ at
// wait for δtail.head ≥ at
err
:=
db
.
waitHeadOrDBUnlock
(
ctx
,
at
)
err
=
db
.
headWait
(
ctx
,
at
)
// XXX -> waitHeadOrDBUnlock ?
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -405,7 +405,7 @@ func (db *DB) open(at Tid, noPool bool) *Connection {
...
@@ -405,7 +405,7 @@ func (db *DB) open(at Tid, noPool bool) *Connection {
// at should be ≤ head (we waited for it before calling here)
// at should be ≤ head (we waited for it before calling here)
if
head
:=
δtail
.
Head
();
at
>
head
{
if
head
:=
δtail
.
Head
();
at
>
head
{
panic
(
"open: head (%s) < at (%s)"
,
head
,
at
)
panic
(
fmt
.
Sprintf
(
"open: at (%s) > head (%s)"
,
at
,
head
)
)
}
}
// at ∈ (δtail, δhead] ; try to get nearby idle connection or make a new one
// at ∈ (δtail, δhead] ; try to get nearby idle connection or make a new one
...
...
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