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
561c9f61
Commit
561c9f61
authored
7 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cdea40d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
go/neo/nodetab.go
go/neo/nodetab.go
+2
-2
go/neo/server/master.go
go/neo/server/master.go
+5
-2
No files found.
go/neo/nodetab.go
View file @
561c9f61
...
...
@@ -45,11 +45,11 @@ import (
// This way all nodes stay informed about their peers in cluster.
//
// Usage examples:
//
// - C needs to connect/talk to a storage by uuid
// (the uuid itself is obtained from PartitionTable by oid).
// - S pulls from other S.
//
//
// NOTE once a node was added to NodeTable its entry is never deleted: if e.g.
// a connection to node is lost associated entry is marked as having DOWN (XXX
// or UNKNOWN ?) node state.
...
...
@@ -104,7 +104,7 @@ type dialed struct {
ready
chan
struct
{}
}
// Link returns link to
the peer
.
// Link returns link to
peer node
.
//
// If the link was not yet established Link dials the peer appropriately,
// handshakes, requests identification and checks that identification reply is
...
...
This diff is collapsed.
Click to expand it.
go/neo/server/master.go
View file @
561c9f61
...
...
@@ -24,7 +24,6 @@ import (
"context"
stderrors
"errors"
"fmt"
// "math"
"sync"
"time"
...
...
@@ -237,7 +236,10 @@ func (m *Master) runMain(ctx context.Context) (err error) {
defer
task
.
Running
(
&
ctx
,
"main"
)(
&
err
)
// NOTE Run's goroutine is the only mutator of nodeTab, partTab and other cluster state
// XXX however since clients request state reading we should use node.StateMu
// XXX however since clients request state reading we should use node.StateMu?
// XXX -> better rework protocol so that master pushes itself (not
// being pulled) to clients everything they need.
for
ctx
.
Err
()
==
nil
{
// recover partition table from storages and wait till enough
...
...
@@ -371,6 +373,7 @@ loop:
// close stor link / update .nodeTab
lclose
(
ctx
,
r
.
stor
.
Link
)
// r.stor.SetState(neo.DOWN)
m
.
node
.
NodeTab
.
SetNodeState
(
r
.
stor
,
neo
.
DOWN
)
}
...
...
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