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
92c5fd44
Commit
92c5fd44
authored
May 31, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a73a1f6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
go/neo/master.go
go/neo/master.go
+8
-7
No files found.
go/neo/master.go
View file @
92c5fd44
...
...
@@ -14,6 +14,7 @@
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
package
neo
// master node
...
...
@@ -90,7 +91,7 @@ func NewMaster(clusterName string) *Master {
// Start requests cluster to eventually transition into running state
// it returns an error if such transition is not currently possible (e.g. partition table is not operational)
// it returns nil if the transition began.
// NOTE upon successful
l
return cluster is not yet in running state - the transition will
// NOTE upon successful return cluster is not yet in running state - the transition will
// take time and could be also automatically aborted due to cluster environment change (e.g.
// a storage node goes down)
func
(
m
*
Master
)
Start
()
error
{
...
...
@@ -274,7 +275,7 @@ loop:
if
m
.
partTab
.
OperationalWith
(
&
m
.
nodeTab
)
{
// reply "ok to start" after whole recovery finishes
// XXX ok? we want to retr
ei
ve all recovery information first?
// XXX ok? we want to retr
ie
ve all recovery information first?
// XXX or initially S is in PENDING state and
// transitions to RUNNING only after successful
// recovery?
...
...
@@ -297,7 +298,7 @@ loop:
}
}
// consume left recovery respon
c
es (which should come without delay since it was cancelled)
// consume left recovery respon
s
es (which should come without delay since it was cancelled)
for
;
inprogress
>
0
;
inprogress
--
{
<-
recovery
}
...
...
@@ -314,7 +315,7 @@ type storRecovery struct {
}
// storCtlRecovery drives a storage node during cluster recovering state
// it retrieves various ids and parition table from as stored on the storage
// it retrieves various ids and par
t
ition table from as stored on the storage
func
storCtlRecovery
(
ctx
context
.
Context
,
link
*
NodeLink
,
res
chan
storRecovery
)
{
var
err
error
defer
func
()
{
...
...
@@ -379,7 +380,7 @@ func storCtlRecovery(ctx context.Context, link *NodeLink, res chan storRecovery)
// --------------------
//
// - starts with operational parttab
// - tell all storages to perform data verifica
ion (TODO) and retrei
ve last ids
// - tell all storages to perform data verifica
tion (TODO) and retrie
ve last ids
// - once we are done without loosing too much storages in the process (so that
// parttab is still operational) we are ready to enter servicing state.
...
...
@@ -632,7 +633,7 @@ func (m *Master) accept(n nodeCome) (node *Node, ok bool) {
// allocUUID allocates new node uuid for a node of kind nodeType
// XXX it is bad idea for master to assign uuid to coming node
// -> better nodes generate really uniqu
i
e UUID themselves and always show with them
// -> better nodes generate really unique UUID themselves and always show with them
func
(
m
*
Master
)
allocUUID
(
nodeType
NodeType
)
NodeUUID
{
// see NodeUUID & NodeUUID.String for details
// XXX better to keep this code near to ^^^ (e.g. attached to NodeType)
...
...
@@ -812,7 +813,7 @@ type storageStartOperation struct {
resp
chan
error
// XXX
}
// storageStopOperation asks storage driver to stop storage node oerating
// storageStopOperation asks storage driver to stop storage node o
p
erating
type
storageStopOperation
struct
{
resp
chan
error
}
...
...
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