Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
edc38c9d
Commit
edc38c9d
authored
Sep 06, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b58a6bc1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
go/neo/client/client.go
go/neo/client/client.go
+1
-2
go/neo/neo.go
go/neo/neo.go
+8
-4
go/neo/server/storage.go
go/neo/server/storage.go
+1
-0
No files found.
go/neo/client/client.go
View file @
edc38c9d
...
...
@@ -250,8 +250,7 @@ func (c *Client) recvMaster(ctx context.Context, mlink *neo.NodeLink) error {
// M sends whole PT
case
*
neo
.
SendPartitionTable
:
pt
:=
neo
.
PartTabFromDump
(
msg
.
PTid
,
msg
.
RowList
)
c
.
node
.
PartTab
=
pt
c
.
node
.
UpdatePartTab
(
ctx
,
msg
)
// M sends δPT
//case *neo.NotifyPartitionChanges:
...
...
go/neo/neo.go
View file @
edc38c9d
...
...
@@ -326,10 +326,6 @@ func (l *listener) Addr() net.Addr {
// ----------------------------------------
// TODO functions to update:
// .PartTab from NotifyPartitionTable msg
// UpdateNodeTab applies updates to .NodeTab from message and logs changes appropriately.
func
(
app
*
NodeApp
)
UpdateNodeTab
(
ctx
context
.
Context
,
msg
*
NotifyNodeInformation
)
{
// XXX msg.IdTime ?
...
...
@@ -357,6 +353,14 @@ func (app *NodeApp) UpdateNodeTab(ctx context.Context, msg *NotifyNodeInformatio
log
.
Infof
(
ctx
,
"full nodetab:
\n
%s"
,
app
.
NodeTab
)
}
// UpdatePartTab applies updates to .PartTab from message and logs changes appropriately.
func
(
app
*
NodeApp
)
UpdatePartTab
(
ctx
context
.
Context
,
msg
*
SendPartitionTable
)
{
pt
:=
PartTabFromDump
(
msg
.
PTid
,
msg
.
RowList
)
// XXX logging under lock
log
.
Infof
(
ctx
,
"rx parttab: %v"
,
pt
)
app
.
PartTab
=
pt
}
// UpdateClusterState applies update to .ClusterState from message and logs change appropriately.
func
(
app
*
NodeApp
)
UpdateClusterState
(
ctx
context
.
Context
,
msg
*
NotifyClusterState
)
{
// XXX loging under lock
...
...
go/neo/server/storage.go
View file @
edc38c9d
...
...
@@ -269,6 +269,7 @@ func (stor *Storage) m1initialize(ctx context.Context, mlink *neo.NodeLink) (req
case
*
neo
.
SendPartitionTable
:
// TODO M sends us whole PT -> save locally
stor
.
node
.
UpdatePartTab
(
ctx
,
msg
)
// XXX lock?
case
*
neo
.
NotifyPartitionChanges
:
// TODO M sends us δPT -> save locally?
...
...
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