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
7e2c82e1
Commit
7e2c82e1
authored
Feb 18, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
635ba959
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
go/neo/client.go
go/neo/client.go
+4
-7
No files found.
go/neo/client.go
View file @
7e2c82e1
...
...
@@ -117,10 +117,7 @@ func (c *Client) Run(ctx context.Context) (err error) {
defer
cancel
()
return
c
.
node
.
TalkMaster
(
ctx
,
func
(
ctx
context
.
Context
,
mlink
*
_MasterLink
)
error
{
// XXX errctx ("on redial"? "connected"?)
c
.
head0
=
c
.
head
wg
:=
xsync
.
NewWorkGroup
(
ctx
)
// launch master notifications receiver
...
...
@@ -129,7 +126,7 @@ func (c *Client) Run(ctx context.Context) (err error) {
})
// sync lastTid with master
// TODO better change protocol for master to send us head
via notify
// TODO better change protocol for master to send us head
right after accept
// channel right after identification.
wg
.
Go
(
func
(
ctx
context
.
Context
)
error
{
return
c
.
syncMaster
(
ctx
,
mlink
)
...
...
@@ -324,7 +321,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (buf *mem.Buf, serial z
}
if
len
(
storv
)
==
0
{
// XXX
recheck it adds traceback to log -> XXX it does not -> add our Bugf which always forces +v on such error print
// XXX
add our Bugf which always forces +v (traceback) on such error print ?
return
nil
,
0
,
errors
.
Errorf
(
"internal inconsistency: cluster is operational, but no storages alive for oid %s"
,
xid
.
Oid
)
}
...
...
@@ -335,7 +332,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (buf *mem.Buf, serial z
slink
,
err
:=
stor
.
Dial
(
ctx
)
if
err
!=
nil
{
return
nil
,
0
,
err
// XXX err ctx
return
nil
,
0
,
err
}
// close accept after dialed (not to deadlock if S decides to send us
// something).
...
...
@@ -354,7 +351,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (buf *mem.Buf, serial z
if
e
,
ok
:=
err
.
(
*
proto
.
Error
);
ok
{
err
=
proto
.
ZODBErrDecode
(
e
)
}
return
nil
,
0
,
err
// XXX err context
return
nil
,
0
,
err
}
buf
=
resp
.
Data
...
...
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