Commit 3d31d3c1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0e4fc602
......@@ -60,17 +60,27 @@ func TestMasterStorage(t *testing.T) {
Mctx, Mcancel := context.WithCancel(context.Background())
Sctx, Scancel := context.WithCancel(context.Background())
_ = Scancel;
_ = Scancel; _ = Mcancel;
//Mev := M.subscribe(...)
err := M.Run(Mctx) // XXX go
err = S.Run(Sctx) // XXX go
wg := WorkGroup()
wg.Gox(func() {
err := M.Run(Mctx)
_ = err // XXX
})
//ev <- Mev
//assert ev == ClusterInformation{State: RECOVERY}
// XXX temp
if err != nil {
panic(err)
if false {
err := S.Run(Sctx) // XXX go
_ = err
}
xwait(wg)
Mcancel() // XXX temp
}
// basic interaction between Client -- Storage
......
......@@ -173,7 +173,7 @@ func nodeLinkPipe() (nl1, nl2 *NodeLink) {
return _nodeLinkPipe(0, 0)
}
// XXX temp for cluster_test.fo
// XXX temp for cluster_test.go
var NodeLinkPipe = nodeLinkPipe
func TestNodeLink(t *testing.T) {
......
......@@ -86,6 +86,8 @@ type Node struct {
Link *NodeLink // link to this node; =nil if not connected XXX do we need it here ?
// XXX identified or not ?
// XXX -> not needed - we only add something to nodetab after identification
// XXX ^^^ is about master. How about e.g. Client that received nodetab
// entry and wants to talk to that node?
}
......
......@@ -635,7 +635,7 @@ func (m *Master) accept(n nodeCome) (node *neo.Node, ok bool) {
IdTimestamp: monotime(),
}
node = m.nodeTab.Update(nodeInfo, n.link) // NOTE this notifies al nodeTab subscribers
node = m.nodeTab.Update(nodeInfo, n.link) // NOTE this notifies all nodeTab subscribers
return node, true
}
......@@ -730,6 +730,11 @@ func (m *Master) ServeLink(ctx context.Context, link *neo.NodeLink) {
logf("identify: accepted")
// XXX on successful identification master should also give us:
// - full snapshots of nodeTab, partTab and clusterState
// - buffered notification channel subscribed to changes of ^^^
// - unsubscribe func XXX needed? -> nodeLeave is enough
// ----------------------------------------
// XXX recheck vvv
......
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