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
7461a018
Commit
7461a018
authored
Feb 19, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e0fdc0e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
go/neo/master.go
go/neo/master.go
+8
-8
No files found.
go/neo/master.go
View file @
7461a018
...
...
@@ -35,7 +35,7 @@ package neo
// to implement that logic and communicates with the subtasks via channels.
// Main is the only mutator of nodeTab, partTab, etc.
//
// -
accept
task that accepts incoming connections and hands them over to main
// -
listen
task that accepts incoming connections and hands them over to main
// via nodeComeq.
//
// - per peer workers are spawned and interact with main via channels.
...
...
@@ -238,9 +238,9 @@ func (m *Master) Run(ctx context.Context, l xnet.Listener) (err error) {
err
=
xerr
.
First
(
err
,
__
)
}()
//
accept
: accept incoming connections and pass them to main driver
//
listen
: accept incoming connections and pass them to main driver
m
.
mainWG
.
Go
(
func
(
ctx
context
.
Context
)
(
err
error
)
{
defer
task
.
Running
(
&
ctx
,
"
accept
"
)(
&
err
)
defer
task
.
Running
(
&
ctx
,
"
listen
"
)(
&
err
)
for
{
if
ctx
.
Err
()
!=
nil
{
...
...
@@ -286,7 +286,7 @@ func (m *Master) Run(ctx context.Context, l xnet.Listener) (err error) {
err
=
m
.
mainWG
.
Wait
()
// change `... canceled` to just canceled?
// (e.g. `master:
accept
: canceled` or `master: main: canceled` -> `master: canceled`)
// (e.g. `master:
listen
: canceled` or `master: main: canceled` -> `master: canceled`)
if
ctx
.
Err
()
!=
nil
{
err
=
ctx
.
Err
()
}
...
...
@@ -586,7 +586,7 @@ func (m *Master) recovery(ctx context.Context) (err error) {
// it retrieves various ids and partition table from as stored on the storage
func
storCtlRecovery
(
ctx
context
.
Context
,
stor
*
_MasteredPeer
)
(
_
*
xneo
.
PartitionTable
,
err
error
)
{
slink
:=
stor
.
node
.
Link
()
defer
task
.
Runningf
(
&
ctx
,
"
%s recovery
"
,
stor
.
node
.
NID
)(
&
err
)
defer
task
.
Runningf
(
&
ctx
,
"
rctl %s
"
,
stor
.
node
.
NID
)(
&
err
)
// XXX cancel on ctx
...
...
@@ -783,7 +783,7 @@ func storCtlVerify(ctx context.Context, stor *_MasteredPeer, pt *xneo.PartitionT
// XXX cancel on ctx
slink
:=
stor
.
node
.
Link
()
defer
task
.
Runningf
(
&
ctx
,
"
%s verify
"
,
stor
.
node
.
NID
)(
&
err
)
defer
task
.
Runningf
(
&
ctx
,
"
vctl %s
"
,
stor
.
node
.
NID
)(
&
err
)
lastOid
=
zodb
.
InvalidOid
lastTid
=
zodb
.
InvalidTid
...
...
@@ -963,7 +963,7 @@ func (m *Master) serve(ctx context.Context) (err error) {
// storCtlServe drives a storage node during cluster serve state.
func
storCtlServe
(
ctx
context
.
Context
,
stor
*
_MasteredPeer
)
(
err
error
)
{
defer
task
.
Runningf
(
&
ctx
,
"
%s serve
"
,
stor
.
node
.
NID
)(
&
err
)
defer
task
.
Runningf
(
&
ctx
,
"
sctl %s
"
,
stor
.
node
.
NID
)(
&
err
)
slink
:=
stor
.
node
.
Link
()
// XXX current neo/py does StartOperation / NotifyReady as separate
...
...
@@ -1007,7 +1007,7 @@ func storCtlServe(ctx context.Context, stor *_MasteredPeer) (err error) {
// serveClient serves incoming client link.
func
(
m
*
Master
)
serveClient
(
ctx
context
.
Context
,
cli
*
_MasteredPeer
)
(
err
error
)
{
defer
task
.
Runningf
(
&
ctx
,
"
%s: serve client
"
,
cli
.
node
.
NID
)(
&
err
)
defer
task
.
Runningf
(
&
ctx
,
"
serve %s
"
,
cli
.
node
.
NID
)(
&
err
)
clink
:=
cli
.
node
.
Link
()
// M <- C requests handler
...
...
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