Commit 391212b7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a0dcc920
......@@ -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)
......
......@@ -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 | |
// +-+
// | |
......
......@@ -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):
......
......@@ -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.
......
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