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
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
Stefane Fermigier
neo
Commits
5ca1de5d
Commit
5ca1de5d
authored
7 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3340f3a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
go/neo/client/client.go
go/neo/client/client.go
+1
-1
go/neo/nodetab.go
go/neo/nodetab.go
+4
-1
No files found.
go/neo/client/client.go
View file @
5ca1de5d
...
@@ -299,7 +299,7 @@ func (c *Client) initFromMaster(ctx context.Context, mlink *neo.NodeLink) (err e
...
@@ -299,7 +299,7 @@ func (c *Client) initFromMaster(ctx context.Context, mlink *neo.NodeLink) (err e
}
}
pt
:=
neo
.
PartTabFromDump
(
rpt
.
PTid
,
rpt
.
RowList
)
pt
:=
neo
.
PartTabFromDump
(
rpt
.
PTid
,
rpt
.
RowList
)
log
.
Infof
(
ctx
,
"master initialized us with nex parttab:
\n
%s"
,
pt
)
log
.
Infof
(
ctx
,
"master initialized us with nex
t
parttab:
\n
%s"
,
pt
)
c
.
node
.
StateMu
.
Lock
()
c
.
node
.
StateMu
.
Lock
()
c
.
node
.
PartTab
=
pt
c
.
node
.
PartTab
=
pt
c
.
node
.
StateMu
.
Unlock
()
c
.
node
.
StateMu
.
Unlock
()
...
...
This diff is collapsed.
Click to expand it.
go/neo/nodetab.go
View file @
5ca1de5d
...
@@ -28,6 +28,7 @@ import (
...
@@ -28,6 +28,7 @@ import (
"time"
"time"
"lab.nexedi.com/kirr/neo/go/xcommon/log"
"lab.nexedi.com/kirr/neo/go/xcommon/log"
"lab.nexedi.com/kirr/neo/go/xcommon/task"
)
)
// NodeTable represents known nodes in a cluster.
// NodeTable represents known nodes in a cluster.
...
@@ -323,7 +324,9 @@ func (p *Node) CloseLink(ctx context.Context) {
...
@@ -323,7 +324,9 @@ func (p *Node) CloseLink(ctx context.Context) {
// dial does low-level work to dial peer
// dial does low-level work to dial peer
// XXX p.* reading without lock - ok?
// XXX p.* reading without lock - ok?
// XXX app.MyInfo without lock - ok?
// XXX app.MyInfo without lock - ok?
func
(
p
*
Node
)
dial
(
ctx
context
.
Context
)
(
*
NodeLink
,
error
)
{
func
(
p
*
Node
)
dial
(
ctx
context
.
Context
)
(
_
*
NodeLink
,
err
error
)
{
defer
task
.
Runningf
(
&
ctx
,
"connect %s"
,
p
.
UUID
)(
&
err
)
// XXX "connect" good word here?
app
:=
p
.
nodeTab
.
nodeApp
app
:=
p
.
nodeTab
.
nodeApp
link
,
accept
,
err
:=
app
.
Dial
(
ctx
,
p
.
Type
,
p
.
Addr
.
String
())
link
,
accept
,
err
:=
app
.
Dial
(
ctx
,
p
.
Type
,
p
.
Addr
.
String
())
if
err
!=
nil
{
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
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