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
864e62ae
Commit
864e62ae
authored
Feb 22, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
de5ae7f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
go/neo/mastered.go
go/neo/mastered.go
+3
-3
No files found.
go/neo/mastered.go
View file @
864e62ae
...
@@ -140,7 +140,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
...
@@ -140,7 +140,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
NID
:
node
.
MyInfo
.
NID
,
NID
:
node
.
MyInfo
.
NID
,
Address
:
node
.
MyInfo
.
Addr
,
Address
:
node
.
MyInfo
.
Addr
,
ClusterName
:
node
.
ClusterName
,
ClusterName
:
node
.
ClusterName
,
IdTime
:
node
.
MyInfo
.
IdTime
,
// XXX ok?
IdTime
:
node
.
MyInfo
.
IdTime
,
DevPath
:
nil
,
// XXX stub
DevPath
:
nil
,
// XXX stub
NewNID
:
nil
,
// XXX stub
NewNID
:
nil
,
// XXX stub
}
}
...
@@ -152,7 +152,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
...
@@ -152,7 +152,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
return
xio
.
WithCloseOnRetCancel
(
ctx
,
mlink
,
func
()
(
err
error
)
{
return
xio
.
WithCloseOnRetCancel
(
ctx
,
mlink
,
func
()
(
err
error
)
{
if
accept
.
YourNID
!=
node
.
MyInfo
.
NID
{
if
accept
.
YourNID
!=
node
.
MyInfo
.
NID
{
log
.
Infof
(
ctx
,
"master %s told us to be %s"
,
accept
.
MyNID
,
accept
.
YourNID
)
log
.
Infof
(
ctx
,
"master %s told us to be %s"
,
accept
.
MyNID
,
accept
.
YourNID
)
node
.
MyInfo
.
NID
=
accept
.
YourNID
// XXX locking ? -> opMu ?
node
.
MyInfo
.
NID
=
accept
.
YourNID
}
}
// TODO verify Mnid = M*; our nid corresponds to our type
// TODO verify Mnid = M*; our nid corresponds to our type
...
@@ -192,7 +192,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
...
@@ -192,7 +192,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
// keep mlink=nil on shutdown so that
// keep mlink=nil on shutdown so that
// .operational does not change to y.
// .operational does not change to y.
node
.
mlink
=
mlink
node
.
mlink
=
mlink
//
XXX
also set node.state.NodeTab[Mnid].link = mlink ?
//
TODO
also set node.state.NodeTab[Mnid].link = mlink ?
}
}
})
})
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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