Commit 9d963b88 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1b329757
......@@ -459,7 +459,3 @@ func (node *_MasteredNode) updateNodeTab(ctx context.Context, msg *proto.NotifyN
log.Infof(ctx, "full nodetab:\n%s", node.state.NodeTab)
return nil
}
// XXX = Dial node by NID, verify it accepts with "MyNID" == NID, YourNID == NID we sent
// func dialNID
......@@ -316,9 +316,9 @@ func (p *PeerNode) ResetLink(ctx context.Context) {
// dial does low-level work to dial peer
// XXX p.* reading without lock - ok?
// XXX app.MyInfo without lock - ok?
// XXX node.MyInfo without lock - ok?
func (p *PeerNode) dial(ctx context.Context) (_ *neonet.NodeLink, err error) {
defer task.Runningf(&ctx, "connect %s", p.NID)(&err) // XXX "connect" good word here?
defer task.Runningf(&ctx, "dial %s", p.NID)(&err)
node := p.nodeTab.localNode
reqID := &proto.RequestIdentification{
......@@ -340,10 +340,10 @@ func (p *PeerNode) dial(ctx context.Context) (_ *neonet.NodeLink, err error) {
// type is already checked by node.Dial
case accept.MyNID != p.NID:
err = fmt.Errorf("connected, but peer's nid is not %v (identifies as %v)", p.NID, accept.MyNID)
err = fmt.Errorf("connected, but peer's nid is not %s (identifies as %s)", p.NID, accept.MyNID)
case accept.YourNID != node.MyInfo.NID:
err = fmt.Errorf("connected, but peer gives us nid %v (our is %v)", accept.YourNID, node.MyInfo.NID)
err = fmt.Errorf("connected, but peer gives us nid %s (our is %s)", accept.YourNID, node.MyInfo.NID)
// XXX PeerNode.Dial is currently used by Client only.
// XXX For Client it would be not correct to check #partition only at
......
......@@ -85,6 +85,7 @@ func NewNode(net xnet.Networker, typ proto.NodeType, clusterName, masterAddr str
// ----------------------------------------
// XXX kill -> only in MasteredNode / talkMaster
// UpdateNodeTab applies updates to .NodeTab from message and logs changes appropriately.
func (node *Node) UpdateNodeTab(ctx context.Context, msg *proto.NotifyNodeInformation) {
......
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