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
9d963b88
Commit
9d963b88
authored
Feb 03, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1b329757
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
go/neo/mastered.go
go/neo/mastered.go
+0
-4
go/neo/xneo/nodetab.go
go/neo/xneo/nodetab.go
+4
-4
go/neo/xneo/xneo.go
go/neo/xneo/xneo.go
+1
-0
No files found.
go/neo/mastered.go
View file @
9d963b88
...
@@ -459,7 +459,3 @@ func (node *_MasteredNode) updateNodeTab(ctx context.Context, msg *proto.NotifyN
...
@@ -459,7 +459,3 @@ func (node *_MasteredNode) updateNodeTab(ctx context.Context, msg *proto.NotifyN
log
.
Infof
(
ctx
,
"full nodetab:
\n
%s"
,
node
.
state
.
NodeTab
)
log
.
Infof
(
ctx
,
"full nodetab:
\n
%s"
,
node
.
state
.
NodeTab
)
return
nil
return
nil
}
}
// XXX = Dial node by NID, verify it accepts with "MyNID" == NID, YourNID == NID we sent
// func dialNID
go/neo/xneo/nodetab.go
View file @
9d963b88
...
@@ -316,9 +316,9 @@ func (p *PeerNode) ResetLink(ctx context.Context) {
...
@@ -316,9 +316,9 @@ func (p *PeerNode) ResetLink(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
node
.MyInfo without lock - ok?
func
(
p
*
PeerNode
)
dial
(
ctx
context
.
Context
)
(
_
*
neonet
.
NodeLink
,
err
error
)
{
func
(
p
*
PeerNode
)
dial
(
ctx
context
.
Context
)
(
_
*
neonet
.
NodeLink
,
err
error
)
{
defer
task
.
Runningf
(
&
ctx
,
"
connect %s"
,
p
.
NID
)(
&
err
)
// XXX "connect" good word here?
defer
task
.
Runningf
(
&
ctx
,
"
dial %s"
,
p
.
NID
)(
&
err
)
node
:=
p
.
nodeTab
.
localNode
node
:=
p
.
nodeTab
.
localNode
reqID
:=
&
proto
.
RequestIdentification
{
reqID
:=
&
proto
.
RequestIdentification
{
...
@@ -340,10 +340,10 @@ func (p *PeerNode) dial(ctx context.Context) (_ *neonet.NodeLink, err error) {
...
@@ -340,10 +340,10 @@ func (p *PeerNode) dial(ctx context.Context) (_ *neonet.NodeLink, err error) {
// type is already checked by node.Dial
// type is already checked by node.Dial
case
accept
.
MyNID
!=
p
.
NID
:
case
accept
.
MyNID
!=
p
.
NID
:
err
=
fmt
.
Errorf
(
"connected, but peer's nid is not %
v (identifies as %v
)"
,
p
.
NID
,
accept
.
MyNID
)
err
=
fmt
.
Errorf
(
"connected, but peer's nid is not %
s (identifies as %s
)"
,
p
.
NID
,
accept
.
MyNID
)
case
accept
.
YourNID
!=
node
.
MyInfo
.
NID
:
case
accept
.
YourNID
!=
node
.
MyInfo
.
NID
:
err
=
fmt
.
Errorf
(
"connected, but peer gives us nid %
v (our is %v
)"
,
accept
.
YourNID
,
node
.
MyInfo
.
NID
)
err
=
fmt
.
Errorf
(
"connected, but peer gives us nid %
s (our is %s
)"
,
accept
.
YourNID
,
node
.
MyInfo
.
NID
)
// XXX PeerNode.Dial is currently used by Client only.
// XXX PeerNode.Dial is currently used by Client only.
// XXX For Client it would be not correct to check #partition only at
// XXX For Client it would be not correct to check #partition only at
...
...
go/neo/xneo/xneo.go
View file @
9d963b88
...
@@ -85,6 +85,7 @@ func NewNode(net xnet.Networker, typ proto.NodeType, clusterName, masterAddr str
...
@@ -85,6 +85,7 @@ func NewNode(net xnet.Networker, typ proto.NodeType, clusterName, masterAddr str
// ----------------------------------------
// ----------------------------------------
// XXX kill -> only in MasteredNode / talkMaster
// UpdateNodeTab applies updates to .NodeTab from message and logs changes appropriately.
// UpdateNodeTab applies updates to .NodeTab from message and logs changes appropriately.
func
(
node
*
Node
)
UpdateNodeTab
(
ctx
context
.
Context
,
msg
*
proto
.
NotifyNodeInformation
)
{
func
(
node
*
Node
)
UpdateNodeTab
(
ctx
context
.
Context
,
msg
*
proto
.
NotifyNodeInformation
)
{
...
...
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