Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
a6684c9c
Commit
a6684c9c
authored
Aug 16, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6cf09f94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
go/neo/server/cluster_test.go
go/neo/server/cluster_test.go
+3
-3
go/neo/server/master.go
go/neo/server/master.go
+6
-6
No files found.
go/neo/server/cluster_test.go
View file @
a6684c9c
...
...
@@ -284,6 +284,9 @@ func TestMasterStorage(t *testing.T) {
// M ready to start: new cluster, no in-progress S recovery
tc
.
Expect
(
masterStartReady
(
M
,
true
))
err
:=
M
.
Start
()
exc
.
Raiseif
(
err
)
// XXX M.partTab = ø
// XXX M can start -> writes parttab to S and goes to verification
...
...
@@ -295,9 +298,6 @@ func TestMasterStorage(t *testing.T) {
// XXX temp
return
err
:=
M
.
Start
()
exc
.
Raiseif
(
err
)
// expect:
// M.clusterState <- VERIFICATION + TODO it should be sent to S
// M -> S .? LockedTransactions{}
...
...
go/neo/server/master.go
View file @
a6684c9c
...
...
@@ -375,13 +375,13 @@ loop:
if
m
.
partTab
.
PTid
==
0
{
// new cluster - allow startup if we have some storages passed
// recovery and there is no in-progress recovery running
n
ok
:=
0
n
up
:=
0
for
_
,
stor
:=
range
m
.
nodeTab
.
StorageList
()
{
if
stor
.
NodeState
>
neo
.
DOWN
{
n
ok
++
n
up
++
}
}
ready
=
(
n
ok
>
0
&&
inprogress
==
0
)
ready
=
(
n
up
>
0
&&
inprogress
==
0
)
}
else
{
ready
=
m
.
partTab
.
OperationalWith
(
m
.
nodeTab
)
// XXX + node state
...
...
@@ -398,6 +398,7 @@ loop:
// if not ok - we just reply not ok
case
ech
:=
<-
m
.
ctlStart
:
if
readyToStart
{
log
.
Infof
(
ctx
,
"start command - we are ready"
)
// reply "ok to start" after whole recovery finishes
// XXX ok? we want to retrieve all recovery information first?
...
...
@@ -414,6 +415,7 @@ loop:
break
loop
}
log
.
Infof
(
ctx
,
"start command - err - we are not ready"
)
ech
<-
fmt
.
Errorf
(
"start: cluster is non-operational"
)
case
ech
:=
<-
m
.
ctlStop
:
...
...
@@ -445,11 +447,9 @@ loop:
}
case
<-
done
:
break
return
err
}
}
return
err
}
// storCtlRecovery drives a storage node during cluster recovering state
...
...
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