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
598538fd
Commit
598538fd
authored
Jan 28, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4ba6eacf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
go/neo/client.go
go/neo/client.go
+3
-1
go/neo/mastered.go
go/neo/mastered.go
+1
-1
go/neo/storage.go
go/neo/storage.go
+1
-1
No files found.
go/neo/client.go
View file @
598538fd
...
...
@@ -111,7 +111,9 @@ func NewClient(clusterName, masterAddr string, net xnet.Networker) *Client {
// Run starts client node and runs it until either ctx is canceled or master
// commands it to shutdown. (TODO verify M->shutdown)
func
(
cli
*
Client
)
Run
(
ctx
context
.
Context
)
error
{
func
(
cli
*
Client
)
Run
(
ctx
context
.
Context
)
(
err
error
)
{
defer
task
.
Running
(
&
ctx
,
"client"
)(
&
err
)
// run process which performs master talk
ctx
,
cancel
:=
context
.
WithCancel
(
ctx
)
cli
.
talkMasterCancel
=
cancel
...
...
go/neo/mastered.go
View file @
598538fd
...
...
@@ -153,7 +153,7 @@ func (node *_MasteredNode) talkMaster1(ctx context.Context) (err error) {
err
=
xcontext
.
WithCloseOnErrCancel
(
ctx
,
mlink
,
func
()
error
{
if
accept
.
YourNID
!=
node
.
myInfo
.
NID
{
log
.
Info
(
ctx
,
"master told us to have nid=%s"
,
accept
.
YourNID
)
log
.
Info
f
(
ctx
,
"master told us to have nid=%s"
,
accept
.
YourNID
)
node
.
myInfo
.
NID
=
accept
.
YourNID
// XXX locking ?
}
...
...
go/neo/storage.go
View file @
598538fd
...
...
@@ -86,7 +86,7 @@ func NewStorage(clusterName, masterAddr string, net xnet.Networker, back storage
// The storage will be serving incoming connections on l.
func
(
stor
*
Storage
)
Run
(
ctx
context
.
Context
,
l
xnet
.
Listener
)
(
err
error
)
{
addr
:=
l
.
Addr
()
defer
task
.
Runningf
(
&
ctx
,
"storage(%
v
)"
,
addr
)(
&
err
)
defer
task
.
Runningf
(
&
ctx
,
"storage(%
s
)"
,
addr
)(
&
err
)
// update our serving address in node
naddr
,
err
:=
proto
.
Addr
(
addr
)
...
...
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