Commit d571d7e9 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0800ed58
This diff is collapsed.
...@@ -61,6 +61,7 @@ func (e *Error) Error() string { ...@@ -61,6 +61,7 @@ func (e *Error) Error() string {
// Use Set instead of direct assignment for ClusterState tracing to work. // Use Set instead of direct assignment for ClusterState tracing to work.
// //
// XXX move this to neo.clusterState wrapping proto.ClusterState? // XXX move this to neo.clusterState wrapping proto.ClusterState?
// XXX kill (_MasteredNode does it)
func (cs *ClusterState) Set(v ClusterState) { func (cs *ClusterState) Set(v ClusterState) {
*cs = v *cs = v
traceClusterStateChanged(cs) traceClusterStateChanged(cs)
......
...@@ -92,6 +92,8 @@ func NewNodeApp(net xnet.Networker, typ proto.NodeType, clusterName, masterAddr ...@@ -92,6 +92,8 @@ func NewNodeApp(net xnet.Networker, typ proto.NodeType, clusterName, masterAddr
// //
// XXX unexport after NodeApp += talkMaster <- used only to dial to M // XXX unexport after NodeApp += talkMaster <- used only to dial to M
// <- dialing to other nodes always go through node.Dial // <- dialing to other nodes always go through node.Dial
//
// XXX <- use dialNode instead
func (app *NodeApp) Dial(ctx context.Context, peerType proto.NodeType, addr string) (_ *neonet.NodeLink, _ *proto.AcceptIdentification, err error) { func (app *NodeApp) Dial(ctx context.Context, peerType proto.NodeType, addr string) (_ *neonet.NodeLink, _ *proto.AcceptIdentification, err error) {
defer task.Runningf(&ctx, "dial %v (%v)", addr, peerType)(&err) defer task.Runningf(&ctx, "dial %v (%v)", addr, peerType)(&err)
......
...@@ -6,8 +6,37 @@ package neo ...@@ -6,8 +6,37 @@ package neo
import ( import (
"lab.nexedi.com/kirr/go123/tracing" "lab.nexedi.com/kirr/go123/tracing"
"unsafe" "unsafe"
"lab.nexedi.com/kirr/neo/go/neo/proto"
) )
// traceevent: traceClusterStateChanged(cs *proto.ClusterState)
type _t_traceClusterStateChanged struct {
tracing.Probe
probefunc func(cs *proto.ClusterState)
}
var _traceClusterStateChanged *_t_traceClusterStateChanged
func traceClusterStateChanged(cs *proto.ClusterState) {
if _traceClusterStateChanged != nil {
_traceClusterStateChanged_run(cs)
}
}
func _traceClusterStateChanged_run(cs *proto.ClusterState) {
for p := _traceClusterStateChanged; p != nil; p = (*_t_traceClusterStateChanged)(unsafe.Pointer(p.Next())) {
p.probefunc(cs)
}
}
func traceClusterStateChanged_Attach(pg *tracing.ProbeGroup, probe func(cs *proto.ClusterState)) *tracing.Probe {
p := _t_traceClusterStateChanged{probefunc: probe}
tracing.AttachProbe(pg, (**tracing.Probe)(unsafe.Pointer(&_traceClusterStateChanged)), &p.Probe)
return &p.Probe
}
// traceevent: traceMasterStartReady(m *Master, ready bool) // traceevent: traceMasterStartReady(m *Master, ready bool)
type _t_traceMasterStartReady struct { type _t_traceMasterStartReady struct {
...@@ -36,4 +65,4 @@ func traceMasterStartReady_Attach(pg *tracing.ProbeGroup, probe func(m *Master, ...@@ -36,4 +65,4 @@ func traceMasterStartReady_Attach(pg *tracing.ProbeGroup, probe func(m *Master,
} }
// trace export signature // trace export signature
func _trace_exporthash_fd2f9958709df62d1f79e16cfd88823a232f5771() {} func _trace_exporthash_885c4ce269e66324d28c9dd9ffcd6959aecaf100() {}
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