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
0cb5a54d
Commit
0cb5a54d
authored
Mar 06, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ada0f636
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
go/zodb/db.go
go/zodb/db.go
+11
-7
No files found.
go/zodb/db.go
View file @
0cb5a54d
...
@@ -475,6 +475,17 @@ func (conn *Connection) Resync(ctx context.Context, at Tid) error {
...
@@ -475,6 +475,17 @@ func (conn *Connection) Resync(ctx context.Context, at Tid) error {
// Must be called with conn.db released.
// Must be called with conn.db released.
func
(
conn
*
Connection
)
resync
(
ctx
context
.
Context
,
at
Tid
)
{
func
(
conn
*
Connection
)
resync
(
ctx
context
.
Context
,
at
Tid
)
{
txn
:=
transaction
.
Current
(
ctx
)
txn
:=
transaction
.
Current
(
ctx
)
conn
.
resync1
(
at
)
// upon exit, with all locks released, register conn to txn.
conn
.
at
=
at
conn
.
txn
=
txn
txn
.
RegisterSync
((
*
connTxnSync
)(
conn
))
}
// resync1 serves resync.
func
(
conn
*
Connection
)
resync1
(
at
Tid
)
{
if
conn
.
txn
!=
nil
{
if
conn
.
txn
!=
nil
{
panic
(
"Conn.resync: previous transaction is not yet complete"
)
panic
(
"Conn.resync: previous transaction is not yet complete"
)
}
}
...
@@ -488,13 +499,6 @@ func (conn *Connection) resync(ctx context.Context, at Tid) {
...
@@ -488,13 +499,6 @@ func (conn *Connection) resync(ctx context.Context, at Tid) {
panic
(
fmt
.
Sprintf
(
"resync: at (%s) > head (%s)"
,
at
,
head
))
panic
(
fmt
.
Sprintf
(
"resync: at (%s) > head (%s)"
,
at
,
head
))
}
}
// upon exit, with all locks released, register conn to txn.
// XXX -> outer func (more clear control flow) ?
defer
func
()
{
conn
.
at
=
at
conn
.
txn
=
txn
txn
.
RegisterSync
((
*
connTxnSync
)(
conn
))
}()
// conn.at == at - nothing to do (even if out of δtail coverage)
// conn.at == at - nothing to do (even if out of δtail coverage)
if
conn
.
at
==
at
{
if
conn
.
at
==
at
{
...
...
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