Commit 421fda44 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 24416cc0
......@@ -29,12 +29,12 @@ import (
// Master is a node overseeing and managing how whole NEO cluster works
type Master struct {
custerName string
clusterName string
clusterState ClusterState
}
func NewMaster(clusterName string) *Master {
m := &Master{clusterName}
m := &Master{clusterName: clusterName}
m.SetClusterState(RECOVERING) // XXX no elections - we are the only master
return m
}
......
......@@ -49,10 +49,11 @@ package neo
// | | tid
// +-+
type PartitionTable struct {
ptTab []...
//ptTab []...
}
// Operational returns whether all object space is covered by at least some ready-to-serve nodes
func (pt *PartitionalTable) Operational() bool {
func (pt *PartitionTable) Operational() bool {
panic("TODO")
}
This diff is collapsed.
......@@ -2,6 +2,11 @@
package neo
import (
"fmt"
"strings"
)
// XXX or better translate to some other errors ?
// XXX here - not in proto.go - because else stringer will be confused
func (e *Error) Error() string {
......@@ -32,7 +37,7 @@ func (nid NodeID) String() string {
// 's1', 'm2', for temporary nids
if temp {
s = strings.Lower(s)
s = strings.ToLower(s)
}
return s
......
......@@ -337,7 +337,8 @@ type AnswerLastIDs struct {
// Ask the full partition table. PM -> S.
// Answer rows in a partition table. S -> PM.
type PartitionTable struct {
// XXX overlap with PartitionTable struct
type X_PartitionTable struct {
}
type AnswerPartitionTable struct {
......
......@@ -211,7 +211,7 @@ func TestPktMarshal(t *testing.T) {
// map[uint32]UUID + trailing ...
{&CheckReplicas{
PartitionDict: map[uint32]UUID{
PartitionDict: map[uint32]NodeID{
1: 7,
2: 9,
7: 3,
......@@ -230,7 +230,7 @@ func TestPktMarshal(t *testing.T) {
},
// uint32, []uint32
{&PartitionCorrupted{7, []UUID{1,3,9,4}},
{&PartitionCorrupted{7, []NodeID{1,3,9,4}},
u32(7) + u32(4) + u32(1) + u32(3) + u32(9) + u32(4),
},
......
......@@ -119,10 +119,10 @@ func IdentifyPeer(link *NodeLink, myNodeType NodeType) (nodeInfo RequestIdentifi
err = EncodeAndSend(conn, &AcceptIdentification{
NodeType: myNodeType,
MyUUID: 0, // XXX
MyNodeID: 0, // XXX
NumPartitions: 0, // XXX
NumReplicas: 0, // XXX
YourUUID: pkt.UUID,
YourNodeID: pkt.NodeID,
Primary: Address{}, // XXX
//KnownMasterList: // XXX
})
......@@ -154,7 +154,7 @@ func IdentifyMe(link *NodeLink, nodeType NodeType /*XXX*/) (peerType NodeType, e
err = EncodeAndSend(conn, &RequestIdentification{
ProtocolVersion: PROTOCOL_VERSION,
NodeType: nodeType,
UUID: 0, // XXX
NodeID: 0, // XXX
Address: Address{}, // XXX
Name: "", // XXX cluster name ?
IdTimestamp: 0, // XXX
......
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