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
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
Levin Zimmermann
neoppod
Commits
081210a3
Commit
081210a3
authored
Feb 18, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8b0d5744
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
go/neo/master.go
go/neo/master.go
+5
-4
No files found.
go/neo/master.go
View file @
081210a3
...
...
@@ -171,6 +171,8 @@ func NewMaster(clusterName string, net xnet.Networker) *Master {
return
m
}
var
ErrStartNonOperational
=
errors
.
New
(
"start: cluster is non-operational"
)
// Start requests cluster to eventually transition into running state.
//
// It returns an error if such transition is not currently possible to begin
...
...
@@ -180,7 +182,6 @@ func NewMaster(clusterName string, net xnet.Networker) *Master {
// 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).
var
ErrStartNonOperational
=
errors
.
New
(
"start: cluster is non-operational"
)
func
(
m
*
Master
)
Start
()
error
{
ech
:=
make
(
chan
error
)
m
.
ctlStart
<-
ech
...
...
@@ -582,7 +583,6 @@ func storCtlRecovery(ctx context.Context, stor *_MasteredPeer) (_ *xneo.Partitio
defer
task
.
Runningf
(
&
ctx
,
"%s recovery"
,
stor
.
node
.
NID
)(
&
err
)
// XXX cancel on ctx
// XXX close slink on err? (if yes -> xcontext.WithCloseOnErrCancel)
recovery
:=
proto
.
AnswerRecovery
{}
err
=
slink
.
Ask1
(
&
proto
.
Recovery
{},
&
recovery
)
...
...
@@ -730,7 +730,7 @@ func (m *Master) verify(ctx context.Context) (err error) {
// a storage node came through verification - adjust our last{Oid,Tid} if ok
// on error check - whether cluster became non-operational and stop verification if so
//
//
FIXME
actually implement logic to decide to finish/rollback transactions
//
TODO
actually implement logic to decide to finish/rollback transactions
case
v
:=
<-
verifiedq
:
close
(
v
.
ack
)
// XXX explain why (see recovery)
inprogress
--
...
...
@@ -794,7 +794,6 @@ func storCtlVerify(ctx context.Context, stor *_MasteredPeer, pt *xneo.PartitionT
}
if
len
(
locked
.
TidDict
)
>
0
{
// TODO vvv
err
=
fmt
.
Errorf
(
"TODO: non-ø locked txns: %v"
,
locked
.
TidDict
)
return
}
...
...
@@ -857,6 +856,8 @@ func (m *Master) serve(ctx context.Context) (err error) {
err
=
m
.
serveClient
(
ctx
,
peer
)
// XXX ADMIN
default
:
err
=
fmt
.
Errorf
(
"TODO: serve %s"
,
peer
.
node
.
Type
)
}
ack
:=
make
(
chan
struct
{})
...
...
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