Commit 16d90573 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f3effa6c
// Copyright (C) 2017-2020 Nexedi SA and Contributors.
// Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -103,7 +103,7 @@ func NewClient(clusterName, masterAddr string, net xnet.Networker) *Client {
}
// Run starts client node and runs it until either ctx is canceled or master
// commands it to shutdown. (XXX verify M->shutdown)
// commands it to shutdown. (TODO verify M->shutdown)
func (cli *Client) Run(ctx context.Context) error {
// run process which performs master talk
ctx, cancel := context.WithCancel(ctx)
......@@ -295,7 +295,6 @@ func (c *Client) talkMaster1(ctx context.Context) (err error) {
opready()
// set c.mlink and notify waiters
c.mlinkMu.Lock()
c.mlink = mlink
......@@ -505,7 +504,7 @@ func (c *Client) Sync(ctx context.Context) (_ zodb.Tid, err error) {
err = mlink.Ask1(&proto.LastTransaction{}, &reply) // XXX Ask += ctx
if err != nil {
// XXX ZODBErrDecode?
return 0, err // XXX err ctx
return 0, err
}
return reply.Tid, nil
}
......
// Copyright (C) 2017-2020 Nexedi SA and Contributors.
// Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -210,7 +210,7 @@ func (m *Master) Run(ctx context.Context, l xnet.Listener) (err error) {
return err
}
// runMain is the process which implements main master cluster management logic: node tracking, cluster
// runMain is the process that implements main master cluster management logic: node tracking, cluster
// state updates, scheduling data movement between storage nodes etc.
func (m *Master) runMain(ctx context.Context) (err error) {
defer task.Running(&ctx, "main")(&err)
......
// Copyright (C) 2016-2020 Nexedi SA and Contributors.
// Copyright (C) 2016-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -150,7 +150,6 @@ func (app *NodeApp) Dial(ctx context.Context, peerType proto.NodeType, addr stri
// Listener is LinkListener adapted to return NodeLink with requested identification on Accept.
// XXX name -> idListener?
type Listener interface {
// from LinkListener:
Close() error
......@@ -172,6 +171,7 @@ type Listener interface {
}
// requireIdentifyHello wraps inner LinkListener into ^^^ Listener.
// XXX naming -> NewListener ?
func requireIdentifyHello(inner neonet.LinkListener) Listener {
return &listener{l: inner}
}
......
// Copyright (C) 2017 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
......@@ -77,7 +77,7 @@ type NodeTable struct {
// Node represents a peer node in the cluster.
//
// XXX name as Peer?
// XXX name as Peer? PeerNode?
type Node struct {
nodeTab *NodeTable // this node is part of
......
// Copyright (C) 2016-2020 Nexedi SA and Contributors.
// Copyright (C) 2016-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......
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