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
2e00d9e4
Commit
2e00d9e4
authored
Oct 27, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5f353dfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
go/neo/client.go
go/neo/client.go
+5
-3
No files found.
go/neo/client.go
View file @
2e00d9e4
...
...
@@ -73,6 +73,7 @@ type Client struct {
// driver client <- watcher: database commits | errors.
watchq
chan
<-
zodb
.
Event
head
zodb
.
Tid
// last invalidation received from server
head0
zodb
.
Tid
// .head state on start of every talkMaster1
at0Mu
sync
.
Mutex
at0
zodb
.
Tid
// at0 obtained when initially connecting to server
...
...
@@ -276,6 +277,8 @@ func (c *Client) talkMaster1(ctx context.Context) (err error) {
c
.
mlinkMu
.
Unlock
()
}()
c
.
head0
=
c
.
head
// launch master notifications receiver
wg
.
Go
(
func
()
error
{
return
c
.
recvMaster
(
ctx
,
mlink
)
...
...
@@ -318,9 +321,8 @@ func (c *Client) initFromMaster(ctx context.Context, mlink *neonet.NodeLink) (er
}
if
c
.
at0Initialized
{
// XXX c.head locking?
if
lastTxn
.
Tid
!=
c
.
head
{
return
fmt
.
Errorf
(
"new transactions were committed while we were disconnected from master (%s -> %s)"
,
c
.
head
,
lastTxn
.
Tid
)
if
lastTxn
.
Tid
!=
c
.
head0
{
return
fmt
.
Errorf
(
"new transactions were committed while we were disconnected from master (%s -> %s)"
,
c
.
head0
,
lastTxn
.
Tid
)
}
}
else
{
// since we read lastTid, in separate protocol exchange there is a
...
...
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