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
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
Stefane Fermigier
neo
Commits
391212b7
Commit
391212b7
authored
May 18, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a0dcc920
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
go/neo/nodetab.go
go/neo/nodetab.go
+4
-2
go/neo/parttab.go
go/neo/parttab.go
+11
-5
neo/client/handlers/master.py
neo/client/handlers/master.py
+1
-1
neo/lib/protocol.py
neo/lib/protocol.py
+4
-2
No files found.
go/neo/nodetab.go
View file @
391212b7
...
...
@@ -31,8 +31,10 @@ type Node struct {
}
// NodeTable represents all known nodes in a cluster from primary master point of view
// XXX do we need "from local-node point of view" ?
// NodeTable represents all nodes in a cluster
//
// Usually Master maintains such table and provides it to other nodes to know
// each other but in general use-cases can be different.
//
// - Primary Master view of cluster
// - M tracks changes to nodeTab as nodes appear (connected to M) and go (disconnected from M)
...
...
go/neo/parttab.go
View file @
391212b7
...
...
@@ -24,8 +24,14 @@ package neo
//
// #Np (how-many partitions) #R (replication factor)
// Cell
// .node (-> .nodeid, .addr)
// .cell_state
// .nodeUUID // .node (-> .node{UUID,Type,State,Addr})
// .cellState
//
// XXX ? + .haveUpToTid associated node has data up to such tid
// = uptodate if haveUpToTid == lastTid
//
// XXX ? + .plannedToDelete (when after tweak another node will get data
// from here and here it will be removed)
//
// .backup_tid # last tid this cell has all data for
// .replicating # currently replicating up to this (.replicating) tid
...
...
@@ -39,9 +45,9 @@ package neo
// Pt
// +-+
// | |
// +-+ +----------
+ +
------------+ +-----+
// | | |node,
state| |node2,
state2| |cell3| ...
// +-+ +----------
+ +
------------+ +-----+
// +-+ +----------
-----+ +-----
------------+ +-----+
// | | |node,
cell_state| |node2,cell_
state2| |cell3| ...
// +-+ +----------
-----+ +-----
------------+ +-----+
// Np | |
// +-+
// | |
...
...
neo/client/handlers/master.py
View file @
391212b7
...
...
@@ -136,7 +136,7 @@ class PrimaryNotificationsHandler(MTEventHandler):
app
.
_cache_lock_release
()
def
notifyPartitionChanges
(
self
,
conn
,
ptid
,
cell_list
):
if
self
.
app
.
pt
.
filled
():
# XXX wrong
if
self
.
app
.
pt
.
filled
():
# XXX wrong
- updating only when already filled ?
self
.
app
.
pt
.
update
(
ptid
,
cell_list
,
self
.
app
.
nm
)
def
notifyNodeInformation
(
self
,
conn
,
timestamp
,
node_list
):
...
...
neo/lib/protocol.py
View file @
391212b7
...
...
@@ -683,8 +683,8 @@ class RequestIdentification(Packet):
_answer
=
PStruct
(
'accept_identification'
,
PFNodeType
,
PUUID
(
'my_uuid'
),
PNumber
(
'num_partitions'
),
PNumber
(
'num_replicas'
),
PNumber
(
'num_partitions'
),
# XXX why here, not in pt updates ?
PNumber
(
'num_replicas'
),
# XXX ---- // ----
PUUID
(
'your_uuid'
),
)
...
...
@@ -737,6 +737,7 @@ class PartitionTable(Packet):
PFRowList
,
)
# XXX dup wrt PartitionChanges ?
class
NotifyPartitionTable
(
Packet
):
"""
Send rows in a partition table to update other nodes. PM -> S, C.
...
...
@@ -746,6 +747,7 @@ class NotifyPartitionTable(Packet):
PFRowList
,
)
# XXX dup wrt NotifyPartitionTable ?
class
PartitionChanges
(
Packet
):
"""
Notify a subset of a partition table. This is used to notify changes.
...
...
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