Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
a8818cc3
Commit
a8818cc3
authored
Feb 03, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f2a1eb68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
52 deletions
+0
-52
go/neo/xneo/xneo.go
go/neo/xneo/xneo.go
+0
-52
No files found.
go/neo/xneo/xneo.go
View file @
a8818cc3
...
...
@@ -23,11 +23,9 @@ package xneo
//go:generate gotrace gen .
import
(
// "context"
"sync"
"lab.nexedi.com/kirr/go123/xnet"
// "lab.nexedi.com/kirr/neo/go/internal/log"
"lab.nexedi.com/kirr/neo/go/neo/proto"
)
...
...
@@ -82,53 +80,3 @@ func NewNode(net xnet.Networker, typ proto.NodeType, clusterName, masterAddr str
node
.
NodeTab
.
localNode
=
node
return
node
}
/*
// ----------------------------------------
// 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) {
// XXX msg.IdTime ?
for _, nodeInfo := range msg.NodeList {
log.Infof(ctx, "node update: %v", nodeInfo)
node.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 replies "unknown by master")
if nodeInfo.NID == node.MyInfo.NID {
// XXX recheck locking
// XXX do .MyInfo = nodeInfo ?
node.MyInfo.IdTime = nodeInfo.IdTime
// FIXME hack - better it be separate command and handled cleanly
if nodeInfo.State == proto.DOWN {
log.Info(ctx, "master told us to shutdown")
log.Flush()
node.OnShutdown()
// os.Exit(1)
return
}
}
}
// FIXME logging under lock (if caller took e.g. .StateMu before applying updates)
log.Infof(ctx, "full nodetab:\n%s", node.NodeTab)
}
// UpdatePartTab applies updates to .PartTab from message and logs changes appropriately.
func (node *Node) UpdatePartTab(ctx context.Context, msg *proto.SendPartitionTable) {
pt := PartTabFromDump(msg.PTid, msg.RowList) // FIXME handle msg.NumReplicas
// XXX logging under lock
log.Infof(ctx, "parttab update: %v", pt)
node.PartTab = pt
}
// UpdateClusterState applies update to .ClusterState from message and logs change appropriately.
func (node *Node) UpdateClusterState(ctx context.Context, msg *proto.NotifyClusterState) {
// XXX loging under lock
log.Infof(ctx, "state update: %v", msg.State)
node.ClusterState.Set(msg.State)
}
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment