Commit 7461a018 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e0fdc0e7
...@@ -35,7 +35,7 @@ package neo ...@@ -35,7 +35,7 @@ package neo
// to implement that logic and communicates with the subtasks via channels. // to implement that logic and communicates with the subtasks via channels.
// Main is the only mutator of nodeTab, partTab, etc. // 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. // via nodeComeq.
// //
// - per peer workers are spawned and interact with main via channels. // - 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) { ...@@ -238,9 +238,9 @@ func (m *Master) Run(ctx context.Context, l xnet.Listener) (err error) {
err = xerr.First(err, __) 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) { m.mainWG.Go(func(ctx context.Context) (err error) {
defer task.Running(&ctx, "accept")(&err) defer task.Running(&ctx, "listen")(&err)
for { for {
if ctx.Err() != nil { if ctx.Err() != nil {
...@@ -286,7 +286,7 @@ func (m *Master) Run(ctx context.Context, l xnet.Listener) (err error) { ...@@ -286,7 +286,7 @@ func (m *Master) Run(ctx context.Context, l xnet.Listener) (err error) {
err = m.mainWG.Wait() err = m.mainWG.Wait()
// change `... canceled` to just canceled? // 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 { if ctx.Err() != nil {
err = ctx.Err() err = ctx.Err()
} }
...@@ -586,7 +586,7 @@ func (m *Master) recovery(ctx context.Context) (err error) { ...@@ -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 // it retrieves various ids and partition table from as stored on the storage
func storCtlRecovery(ctx context.Context, stor *_MasteredPeer) (_ *xneo.PartitionTable, err error) { func storCtlRecovery(ctx context.Context, stor *_MasteredPeer) (_ *xneo.PartitionTable, err error) {
slink := stor.node.Link() 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 // XXX cancel on ctx
...@@ -783,7 +783,7 @@ func storCtlVerify(ctx context.Context, stor *_MasteredPeer, pt *xneo.PartitionT ...@@ -783,7 +783,7 @@ func storCtlVerify(ctx context.Context, stor *_MasteredPeer, pt *xneo.PartitionT
// XXX cancel on ctx // XXX cancel on ctx
slink := stor.node.Link() 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 lastOid = zodb.InvalidOid
lastTid = zodb.InvalidTid lastTid = zodb.InvalidTid
...@@ -963,7 +963,7 @@ func (m *Master) serve(ctx context.Context) (err error) { ...@@ -963,7 +963,7 @@ func (m *Master) serve(ctx context.Context) (err error) {
// storCtlServe drives a storage node during cluster serve state. // storCtlServe drives a storage node during cluster serve state.
func storCtlServe(ctx context.Context, stor *_MasteredPeer) (err error) { 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() slink := stor.node.Link()
// XXX current neo/py does StartOperation / NotifyReady as separate // XXX current neo/py does StartOperation / NotifyReady as separate
...@@ -1007,7 +1007,7 @@ func storCtlServe(ctx context.Context, stor *_MasteredPeer) (err error) { ...@@ -1007,7 +1007,7 @@ func storCtlServe(ctx context.Context, stor *_MasteredPeer) (err error) {
// serveClient serves incoming client link. // serveClient serves incoming client link.
func (m *Master) serveClient(ctx context.Context, cli *_MasteredPeer) (err error) { 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() clink := cli.node.Link()
// M <- C requests handler // M <- C requests handler
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment