Commit 5ca1de5d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3340f3a3
...@@ -299,7 +299,7 @@ func (c *Client) initFromMaster(ctx context.Context, mlink *neo.NodeLink) (err e ...@@ -299,7 +299,7 @@ func (c *Client) initFromMaster(ctx context.Context, mlink *neo.NodeLink) (err e
} }
pt := neo.PartTabFromDump(rpt.PTid, rpt.RowList) pt := neo.PartTabFromDump(rpt.PTid, rpt.RowList)
log.Infof(ctx, "master initialized us with nex parttab:\n%s", pt) log.Infof(ctx, "master initialized us with next parttab:\n%s", pt)
c.node.StateMu.Lock() c.node.StateMu.Lock()
c.node.PartTab = pt c.node.PartTab = pt
c.node.StateMu.Unlock() c.node.StateMu.Unlock()
......
...@@ -28,6 +28,7 @@ import ( ...@@ -28,6 +28,7 @@ import (
"time" "time"
"lab.nexedi.com/kirr/neo/go/xcommon/log" "lab.nexedi.com/kirr/neo/go/xcommon/log"
"lab.nexedi.com/kirr/neo/go/xcommon/task"
) )
// NodeTable represents known nodes in a cluster. // NodeTable represents known nodes in a cluster.
...@@ -323,7 +324,9 @@ func (p *Node) CloseLink(ctx context.Context) { ...@@ -323,7 +324,9 @@ func (p *Node) CloseLink(ctx context.Context) {
// dial does low-level work to dial peer // dial does low-level work to dial peer
// XXX p.* reading without lock - ok? // XXX p.* reading without lock - ok?
// XXX app.MyInfo without lock - ok? // XXX app.MyInfo without lock - ok?
func (p *Node) dial(ctx context.Context) (*NodeLink, error) { func (p *Node) dial(ctx context.Context) (_ *NodeLink, err error) {
defer task.Runningf(&ctx, "connect %s", p.UUID)(&err) // XXX "connect" good word here?
app := p.nodeTab.nodeApp app := p.nodeTab.nodeApp
link, accept, err := app.Dial(ctx, p.Type, p.Addr.String()) link, accept, err := app.Dial(ctx, p.Type, p.Addr.String())
if err != nil { if err != nil {
......
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