Commit 73b9c447 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e9af596e
......@@ -183,6 +183,7 @@ func (c *Client) updateOperational() (sendReady func()) {
//
// The only error possible is if provided ctx cancels.
// XXX and client stopped/closed? (ctx passed to Run cancelled)
// XXX change signature to call f from under withOperational ?
func (c *Client) withOperational(ctx context.Context) error {
for {
c.node.StateMu.RLock()
......@@ -314,14 +315,15 @@ func (c *Client) recvMaster1(ctx context.Context, req neonet.Request) error {
c.node.StateMu.Unlock()
return fmt.Errorf("unexpected message: %T", msg)
// M sends whole PT
// <- whole partTab
case *proto.SendPartitionTable:
c.node.UpdatePartTab(ctx, msg)
// M sends δPT
//case *proto.NotifyPartitionChanges:
// TODO
// <- δ(partTab)
case *proto.NotifyPartitionChanges:
panic("TODO δ(partTab)")
// <- δ(nodeTab)
case *proto.NotifyNodeInformation:
c.node.UpdateNodeTab(ctx, msg)
......
......@@ -299,7 +299,7 @@ func (app *NodeApp) UpdateNodeTab(ctx context.Context, msg *proto.NotifyNodeInfo
app.NodeTab.Update(nodeInfo)
// XXX we have to provide IdTime when requesting identification to other peers
// (e.g. Spy checks this is what master broadcast them and if not replis "unknown by master")
// (e.g. Spy checks this is what master broadcast them and if not replies "unknown by master")
if nodeInfo.UUID == app.MyInfo.UUID {
// XXX recheck locking
// XXX do .MyInfo = nodeInfo ?
......
......@@ -148,6 +148,8 @@ func (nt *NodeTable) Update(nodeInfo proto.NodeInfo) *Node {
}
*/
// XXX close link if .state becomes DOWN ?
traceNodeChanged(nt, node)
nt.notify(node.NodeInfo)
......
......@@ -21,6 +21,9 @@
"""runneo.py runs NEO/py cluster for NEO/go testing.
Usage: runneo.py <workdir> <cluster-name> XXX + (**kw for NEOCluster)
<workdir>/ready is created with address of master after spawned cluster becomes
operational.
"""
from neo.tests.functional import NEOCluster
......@@ -61,11 +64,9 @@ def main():
os.unlink(readyf)
defer(_)
while 1:
sleep(1)
if __name__ == '__main__':
main()
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