Commit be36b5ee authored by Kirill Smelkov's avatar Kirill Smelkov

go/neo/proto: UUID -> NID (NodeID)

NEO/py switched from UUID to 4-byte NodeID long time ago in
nexedi/neoppod@23fad3af and has a TODO to
rename uuid to nid.

NEO protocol also talks about renaming uuid to nid:

    note: the uuid variable should be renamed into nid
    https://neo.nexedi.com/P-NEO-Protocol.Specification.2019?portal_skin=CI_slideshow#/9/5

NEO/go can do the rename now.
parent f76d824c
...@@ -59,22 +59,22 @@ func (e *Error) Error() string { ...@@ -59,22 +59,22 @@ func (e *Error) Error() string {
// node type -> character representing it. // node type -> character representing it.
const nodeTypeChar = "SMCA" // NOTE neo/py does this out of sync with NodeType constants. const nodeTypeChar = "SMCA" // NOTE neo/py does this out of sync with NodeType constants.
// String returns string representation of a node uuid. // String returns string representation of a node ID.
// //
// It returns ex 'S1', 'M2', ... // It returns ex 'S1', 'M2', ...
func (nodeUUID NodeUUID) String() string { func (nid NodeID) String() string {
if nodeUUID == 0 { if nid == 0 {
return "?(0)0" return "?(0)0"
} }
num := nodeUUID & (1<<24 - 1) num := nid & (1<<24 - 1)
// XXX UUID_NAMESPACES description does not match neo/py code // XXX UUID_NAMESPACES description does not match neo/py code
//typ := nodeUUID >> 24 //typ := nid >> 24
//temp := typ&(1 << 7) != 0 //temp := typ&(1 << 7) != 0
//typ &= 1<<7 - 1 //typ &= 1<<7 - 1
//nodeType := typ >> 4 //nodeType := typ >> 4
typ := uint8(-int8(nodeUUID>>24)) >> 4 typ := uint8(-int8(nid>>24)) >> 4
if typ < 4 { if typ < 4 {
return fmt.Sprintf("%c%d", nodeTypeChar[typ], num) return fmt.Sprintf("%c%d", nodeTypeChar[typ], num)
...@@ -100,8 +100,8 @@ var nodeTypeNum = [...]int8{ ...@@ -100,8 +100,8 @@ var nodeTypeNum = [...]int8{
CLIENT: -0x20, CLIENT: -0x20,
ADMIN: -0x30, ADMIN: -0x30,
} }
// UUID creates node uuid from node type and number. // NID creates node ID from node type and number.
func UUID(typ NodeType, num int32) NodeUUID { func NID(typ NodeType, num int32) NodeID {
// XXX neo/py does not what UUID_NAMESPACES describes // XXX neo/py does not what UUID_NAMESPACES describes
/* /*
temp := uint32(0) temp := uint32(0)
...@@ -121,9 +121,9 @@ func UUID(typ NodeType, num int32) NodeUUID { ...@@ -121,9 +121,9 @@ func UUID(typ NodeType, num int32) NodeUUID {
panic("node number out of range") panic("node number out of range")
} }
//uuid := temp << (7 + 3*8) | uint32(typ) << (4 + 3*8) | uint32(num) //nid := temp << (7 + 3*8) | uint32(typ) << (4 + 3*8) | uint32(num)
uuid := uint32(uint8(typn))<<(3*8) | uint32(num) nid := uint32(uint8(typn))<<(3*8) | uint32(num)
return NodeUUID(uuid) return NodeID(nid)
} }
// ---------------------------------------- // ----------------------------------------
......
...@@ -88,7 +88,7 @@ const ( ...@@ -88,7 +88,7 @@ const (
// answerBit is set in message code in answer messages for compatibility with neo/py // answerBit is set in message code in answer messages for compatibility with neo/py
answerBit = 0x8000 answerBit = 0x8000
//INVALID_UUID UUID = 0 //INVALID_NID NID = 0
INVALID_TID zodb.Tid = 1<<64 - 1 // 0xffffffffffffffff INVALID_TID zodb.Tid = 1<<64 - 1 // 0xffffffffffffffff
INVALID_OID zodb.Oid = 1<<64 - 1 INVALID_OID zodb.Oid = 1<<64 - 1
...@@ -263,7 +263,7 @@ const ( ...@@ -263,7 +263,7 @@ const (
DISCARDED //short: D DISCARDED //short: D
) )
// NodeUUID is a node identifier, 4-bytes signed integer // NodeID is a node identifier, 4-bytes signed integer
// //
// High-order byte: // High-order byte:
// //
...@@ -272,17 +272,17 @@ const ( ...@@ -272,17 +272,17 @@ const (
// | +-+-+---------- node type // | +-+-+---------- node type
// +---------------- temporary if negative // +---------------- temporary if negative
// //
// UUID namespaces are required to prevent conflicts when the master generate // NID namespaces are required to prevent conflicts when the master generate
// new uuid before it knows uuid of existing storage nodes. So only the high // new nid before it knows nid of existing storage nodes. So only the high
// order bit is really important and the 31 other bits could be random. // order bit is really important and the 31 other bits could be random.
// Extra namespace information and non-randomness of 3 LOB help to read logs. // Extra namespace information and non-randomness of 3 LOB help to read logs.
// //
// 0 is invalid NodeUUID XXX correct? // 0 is invalid NodeID XXX correct?
// //
// TODO -> back to 16-bytes randomly generated UUID // TODO -> back to 16-bytes randomly generated node IDs
type NodeUUID int32 type NodeID int32
// TODO NodeType -> base NodeUUID // TODO NodeType -> base NodeID
// Address represents host:port network endpoint. // Address represents host:port network endpoint.
...@@ -373,14 +373,14 @@ func (t *IdTime) neoDecodeN(data []byte) (uint64, bool) { ...@@ -373,14 +373,14 @@ func (t *IdTime) neoDecodeN(data []byte) (uint64, bool) {
type NodeInfo struct { type NodeInfo struct {
Type NodeType Type NodeType
Addr Address // serving address Addr Address // serving address
UUID NodeUUID NID NodeID
State NodeState State NodeState
IdTime IdTime // XXX clarify semantic where it is used IdTime IdTime // XXX clarify semantic where it is used
} }
//neo:proto typeonly //neo:proto typeonly
type CellInfo struct { type CellInfo struct {
UUID NodeUUID NID NodeID
State CellState State CellState
} }
...@@ -408,7 +408,7 @@ type Error struct { ...@@ -408,7 +408,7 @@ type Error struct {
//neo:nodes * -> * //neo:nodes * -> *
type RequestIdentification struct { type RequestIdentification struct {
NodeType NodeType // XXX name NodeType NodeType // XXX name
UUID NodeUUID NID NodeID
Address Address // where requesting node is also accepting connections Address Address // where requesting node is also accepting connections
ClusterName string ClusterName string
IdTime IdTime IdTime IdTime
...@@ -420,8 +420,8 @@ type RequestIdentification struct { ...@@ -420,8 +420,8 @@ type RequestIdentification struct {
//neo:proto answer //neo:proto answer
type AcceptIdentification struct { type AcceptIdentification struct {
NodeType NodeType // XXX name NodeType NodeType // XXX name
MyUUID NodeUUID MyNID NodeID
YourUUID NodeUUID YourNID NodeID
} }
// Empty request used as network barrier. // Empty request used as network barrier.
...@@ -445,7 +445,7 @@ type PrimaryMaster struct { ...@@ -445,7 +445,7 @@ type PrimaryMaster struct {
} }
type AnswerPrimary struct { type AnswerPrimary struct {
PrimaryNodeUUID NodeUUID PrimaryNodeID NodeID
} }
// Notify peer that I'm not the primary master. Attach any extra information // Notify peer that I'm not the primary master. Attach any extra information
...@@ -453,7 +453,7 @@ type AnswerPrimary struct { ...@@ -453,7 +453,7 @@ type AnswerPrimary struct {
// //
//neo:nodes SM -> * //neo:nodes SM -> *
type NotPrimaryMaster struct { type NotPrimaryMaster struct {
Primary NodeUUID // XXX PSignedNull in py Primary NodeID // XXX PSignedNull in py
KnownMasterList []struct { KnownMasterList []struct {
Address Address
} }
...@@ -609,7 +609,7 @@ type AnswerBeginTransaction struct { ...@@ -609,7 +609,7 @@ type AnswerBeginTransaction struct {
//neo:nodes C -> M //neo:nodes C -> M
type FailedVote struct { type FailedVote struct {
Tid zodb.Tid Tid zodb.Tid
NodeList []NodeUUID NodeList []NodeID
// answer = Error // answer = Error
} }
...@@ -741,7 +741,7 @@ type AnswerStoreObject struct { ...@@ -741,7 +741,7 @@ type AnswerStoreObject struct {
//neo:nodes C -> S; C -> M -> S //neo:nodes C -> S; C -> M -> S
type AbortTransaction struct { type AbortTransaction struct {
Tid zodb.Tid Tid zodb.Tid
NodeList []NodeUUID // unused for * -> S NodeList []NodeID // unused for * -> S
} }
// Ask to store a transaction. Implies vote. // Ask to store a transaction. Implies vote.
...@@ -840,7 +840,7 @@ type AnswerObjectHistory struct { ...@@ -840,7 +840,7 @@ type AnswerObjectHistory struct {
type PartitionList struct { type PartitionList struct {
MinOffset uint32 // PNumber MinOffset uint32 // PNumber
MaxOffset uint32 // PNumber MaxOffset uint32 // PNumber
NodeUUID NodeUUID NodeID NodeID
} }
type AnswerPartitionList struct { type AnswerPartitionList struct {
...@@ -864,7 +864,7 @@ type AnswerNodeList struct { ...@@ -864,7 +864,7 @@ type AnswerNodeList struct {
// //
//neo:nodes ctl -> A -> M //neo:nodes ctl -> A -> M
type SetNodeState struct { type SetNodeState struct {
NodeUUID NodeID
NodeState NodeState
// answer = Error // answer = Error
...@@ -875,7 +875,7 @@ type SetNodeState struct { ...@@ -875,7 +875,7 @@ type SetNodeState struct {
// //
//neo:nodes ctl -> A -> M //neo:nodes ctl -> A -> M
type AddPendingNodes struct { type AddPendingNodes struct {
NodeList []NodeUUID NodeList []NodeID
// answer = Error // answer = Error
} }
...@@ -886,7 +886,7 @@ type AddPendingNodes struct { ...@@ -886,7 +886,7 @@ type AddPendingNodes struct {
//neo:nodes ctl -> A -> M //neo:nodes ctl -> A -> M
type TweakPartitionTable struct { type TweakPartitionTable struct {
DryRun bool DryRun bool
NodeList []NodeUUID NodeList []NodeID
// answer = Error // answer = Error
} }
...@@ -924,7 +924,7 @@ type repairFlags struct { ...@@ -924,7 +924,7 @@ type repairFlags struct {
// //
//neo:nodes ctl -> A -> M //neo:nodes ctl -> A -> M
type Repair struct { type Repair struct {
NodeList []NodeUUID NodeList []NodeID
repairFlags repairFlags
} }
...@@ -1016,7 +1016,7 @@ type AnswerPack struct { ...@@ -1016,7 +1016,7 @@ type AnswerPack struct {
// //
//neo:nodes ctl -> A -> M //neo:nodes ctl -> A -> M
type CheckReplicas struct { type CheckReplicas struct {
PartitionDict map[uint32]NodeUUID // partition -> source (PNumber) PartitionDict map[uint32]NodeID // partition -> source (PNumber)
MinTID zodb.Tid MinTID zodb.Tid
MaxTID zodb.Tid MaxTID zodb.Tid
...@@ -1083,7 +1083,7 @@ type AnswerCheckSerialRange struct { ...@@ -1083,7 +1083,7 @@ type AnswerCheckSerialRange struct {
//neo:nodes S -> M //neo:nodes S -> M
type PartitionCorrupted struct { type PartitionCorrupted struct {
Partition uint32 // PNumber Partition uint32 // PNumber
CellList []NodeUUID CellList []NodeID
} }
// Notify that node is ready to serve requests. // Notify that node is ready to serve requests.
......
...@@ -205,7 +205,7 @@ func TestMsgMarshal(t *testing.T) { ...@@ -205,7 +205,7 @@ func TestMsgMarshal(t *testing.T) {
hex("c408") + hex("0a0b0c0d0e0f0104"), hex("c408") + hex("0a0b0c0d0e0f0104"),
}, },
// PTid, [] (of [] of {UUID, CellState}) // PTid, [] (of [] of {NodeID, CellState})
{&AnswerPartitionTable{ {&AnswerPartitionTable{
PTid: 0x0102030405060708, PTid: 0x0102030405060708,
NumReplicas: 34, NumReplicas: 34,
...@@ -263,9 +263,9 @@ func TestMsgMarshal(t *testing.T) { ...@@ -263,9 +263,9 @@ func TestMsgMarshal(t *testing.T) {
hex("c408")+u64(8) + hex("93") + hex("c408")+u64(7) + hex("c408")+u64(1) + hex("c2"), hex("c408")+u64(8) + hex("93") + hex("c408")+u64(7) + hex("c408")+u64(1) + hex("c2"),
}, },
// map[uint32]UUID + trailing ... // map[uint32]NodeID + trailing ...
{&CheckReplicas{ {&CheckReplicas{
PartitionDict: map[uint32]NodeUUID{ PartitionDict: map[uint32]NodeID{
1: 7, 1: 7,
2: 9, 2: 9,
7: 3, 7: 3,
...@@ -295,7 +295,7 @@ func TestMsgMarshal(t *testing.T) { ...@@ -295,7 +295,7 @@ func TestMsgMarshal(t *testing.T) {
}, },
// uint32, []uint32 // uint32, []uint32
{&PartitionCorrupted{7, []NodeUUID{1, 3, 9, 4}}, {&PartitionCorrupted{7, []NodeID{1, 3, 9, 4}},
// N // N
u32(7) + u32(4) + u32(1) + u32(3) + u32(9) + u32(4), u32(7) + u32(4) + u32(1) + u32(3) + u32(9) + u32(4),
...@@ -329,7 +329,7 @@ func TestMsgMarshal(t *testing.T) { ...@@ -329,7 +329,7 @@ func TestMsgMarshal(t *testing.T) {
// IdTime, empty Address, int32 // IdTime, empty Address, int32
{&NotifyNodeInformation{1504466245.926185, []NodeInfo{ {&NotifyNodeInformation{1504466245.926185, []NodeInfo{
{CLIENT, Address{}, UUID(CLIENT, 1), RUNNING, 1504466245.925599}}}, {CLIENT, Address{}, NID(CLIENT, 1), RUNNING, 1504466245.925599}}},
// N // N
hex("41d66b15517b469d") + u32(1) + hex("41d66b15517b469d") + u32(1) +
u8(2) + u32(0) /* <- ø Address */ + hex("e0000001") + u8(2) + u8(2) + u32(0) /* <- ø Address */ + hex("e0000001") + u8(2) +
...@@ -425,8 +425,8 @@ func TestMsgDecodeLenOverflowN(t *testing.T) { ...@@ -425,8 +425,8 @@ func TestMsgDecodeLenOverflowN(t *testing.T) {
} }
} }
func TestUUID(t *testing.T) { func TestNID(t *testing.T) {
var testv = []struct{typ NodeType; num int32; uuid uint32; str string}{ var testv = []struct{typ NodeType; num int32; nid uint32; str string}{
{STORAGE, 1, 0x00000001, "S1"}, {STORAGE, 1, 0x00000001, "S1"},
{MASTER, 2, 0xf0000002, "M2"}, {MASTER, 2, 0xf0000002, "M2"},
{CLIENT, 3, 0xe0000003, "C3"}, {CLIENT, 3, 0xe0000003, "C3"},
...@@ -434,18 +434,18 @@ func TestUUID(t *testing.T) { ...@@ -434,18 +434,18 @@ func TestUUID(t *testing.T) {
} }
for _, tt := range testv { for _, tt := range testv {
uuid := UUID(tt.typ, tt.num) nid := NID(tt.typ, tt.num)
if uint32(uuid) != tt.uuid { if uint32(nid) != tt.nid {
t.Errorf("%v: uuid=%08x ; want %08x", tt, uuid, tt.uuid) t.Errorf("%v: nid=%08x ; want %08x", tt, nid, tt.nid)
} }
if uuids := uuid.String(); uuids != tt.str { if nids := nid.String(); nids != tt.str {
t.Errorf("%v: str(uuid): %q ; want %q", tt, uuids, tt.str) t.Errorf("%v: str(nid): %q ; want %q", tt, nids, tt.str)
} }
} }
} }
func TestUUIDDecode(t *testing.T) { func TestNIDDecode(t *testing.T) {
var testv = []struct{uuid uint32; str string}{ var testv = []struct{nid uint32; str string}{
{0, "?(0)0"}, {0, "?(0)0"},
{0x00000001, "S1"}, {0x00000001, "S1"},
{0xf0000002, "M2"}, {0xf0000002, "M2"},
...@@ -467,9 +467,9 @@ func TestUUIDDecode(t *testing.T) { ...@@ -467,9 +467,9 @@ func TestUUIDDecode(t *testing.T) {
} }
for _, tt := range testv { for _, tt := range testv {
str := NodeUUID(tt.uuid).String() str := NodeID(tt.nid).String()
if str != tt.str { if str != tt.str {
t.Errorf("%08x -> %q ; want %q", tt.uuid, str, tt.str) t.Errorf("%08x -> %q ; want %q", tt.nid, str, tt.str)
} }
} }
} }
...@@ -136,7 +136,7 @@ func (p *RequestIdentification) neoMsgEncodedLenN() int { ...@@ -136,7 +136,7 @@ func (p *RequestIdentification) neoMsgEncodedLenN() int {
func (p *RequestIdentification) neoMsgEncodeN(data []byte) { func (p *RequestIdentification) neoMsgEncodeN(data []byte) {
(data[0:])[0] = uint8(int8(p.NodeType)) (data[0:])[0] = uint8(int8(p.NodeType))
binary.BigEndian.PutUint32(data[1:], uint32(int32(p.UUID))) binary.BigEndian.PutUint32(data[1:], uint32(int32(p.NID)))
{ {
n := p.Address.neoEncodeN(data[5:]) n := p.Address.neoEncodeN(data[5:])
data = data[5+n:] data = data[5+n:]
...@@ -185,7 +185,7 @@ func (p *RequestIdentification) neoMsgDecodeN(data []byte) (int, error) { ...@@ -185,7 +185,7 @@ func (p *RequestIdentification) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
p.NodeType = NodeType(int8((data[0 : 0+1])[0])) p.NodeType = NodeType(int8((data[0 : 0+1])[0]))
p.UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[1 : 1+4]))) p.NID = NodeID(int32(binary.BigEndian.Uint32(data[1 : 1+4])))
data = data[5:] data = data[5:]
{ {
n, ok := p.Address.neoDecodeN(data) n, ok := p.Address.neoDecodeN(data)
...@@ -274,7 +274,7 @@ func (p *RequestIdentification) neoMsgEncodedLenM() int { ...@@ -274,7 +274,7 @@ func (p *RequestIdentification) neoMsgEncodedLenM() int {
a := &p.NewNID[i] a := &p.NewNID[i]
size += msgpack.Uint32Size((*a)) size += msgpack.Uint32Size((*a))
} }
return 14 + msgpack.Int32Size(int32(p.UUID)) + msgpack.BinHeadSize(len(p.Address.Host)) + len(p.Address.Host) + msgpack.Uint16Size(p.Address.Port) + msgpack.BinHeadSize(len(p.ClusterName)) + len(p.ClusterName) + msgpack.ArrayHeadSize(len(p.DevPath)) + msgpack.ArrayHeadSize(len(p.NewNID)) + size return 14 + msgpack.Int32Size(int32(p.NID)) + msgpack.BinHeadSize(len(p.Address.Host)) + len(p.Address.Host) + msgpack.Uint16Size(p.Address.Port) + msgpack.BinHeadSize(len(p.ClusterName)) + len(p.ClusterName) + msgpack.ArrayHeadSize(len(p.DevPath)) + msgpack.ArrayHeadSize(len(p.NewNID)) + size
} }
func (p *RequestIdentification) neoMsgEncodeM(data []byte) { func (p *RequestIdentification) neoMsgEncodeM(data []byte) {
...@@ -286,7 +286,7 @@ func (p *RequestIdentification) neoMsgEncodeM(data []byte) { ...@@ -286,7 +286,7 @@ func (p *RequestIdentification) neoMsgEncodeM(data []byte) {
} }
data[3] = byte(p.NodeType) data[3] = byte(p.NodeType)
{ {
n := msgpack.PutInt32(data[4:], int32(p.UUID)) n := msgpack.PutInt32(data[4:], int32(p.NID))
data = data[4+n:] data = data[4+n:]
} }
data[0] = byte(msgpack.FixArray_4 | 2) data[0] = byte(msgpack.FixArray_4 | 2)
...@@ -364,9 +364,9 @@ func (p *RequestIdentification) neoMsgDecodeM(data []byte) (int, error) { ...@@ -364,9 +364,9 @@ func (p *RequestIdentification) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("RequestIdentification.UUID", err) return 0, mdecodeErr("RequestIdentification.NID", err)
} }
p.UUID = NodeUUID(v) p.NID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -473,8 +473,8 @@ func (p *AcceptIdentification) neoMsgEncodedLenN() int { ...@@ -473,8 +473,8 @@ func (p *AcceptIdentification) neoMsgEncodedLenN() int {
func (p *AcceptIdentification) neoMsgEncodeN(data []byte) { func (p *AcceptIdentification) neoMsgEncodeN(data []byte) {
(data[0:])[0] = uint8(int8(p.NodeType)) (data[0:])[0] = uint8(int8(p.NodeType))
binary.BigEndian.PutUint32(data[1:], uint32(int32(p.MyUUID))) binary.BigEndian.PutUint32(data[1:], uint32(int32(p.MyNID)))
binary.BigEndian.PutUint32(data[5:], uint32(int32(p.YourUUID))) binary.BigEndian.PutUint32(data[5:], uint32(int32(p.YourNID)))
} }
func (p *AcceptIdentification) neoMsgDecodeN(data []byte) (int, error) { func (p *AcceptIdentification) neoMsgDecodeN(data []byte) (int, error) {
...@@ -482,8 +482,8 @@ func (p *AcceptIdentification) neoMsgDecodeN(data []byte) (int, error) { ...@@ -482,8 +482,8 @@ func (p *AcceptIdentification) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
p.NodeType = NodeType(int8((data[0 : 0+1])[0])) p.NodeType = NodeType(int8((data[0 : 0+1])[0]))
p.MyUUID = NodeUUID(int32(binary.BigEndian.Uint32(data[1 : 1+4]))) p.MyNID = NodeID(int32(binary.BigEndian.Uint32(data[1 : 1+4])))
p.YourUUID = NodeUUID(int32(binary.BigEndian.Uint32(data[5 : 5+4]))) p.YourNID = NodeID(int32(binary.BigEndian.Uint32(data[5 : 5+4])))
return 9, nil return 9, nil
overflow: overflow:
...@@ -491,7 +491,7 @@ overflow: ...@@ -491,7 +491,7 @@ overflow:
} }
func (p *AcceptIdentification) neoMsgEncodedLenM() int { func (p *AcceptIdentification) neoMsgEncodedLenM() int {
return 4 + msgpack.Int32Size(int32(p.MyUUID)) + msgpack.Int32Size(int32(p.YourUUID)) return 4 + msgpack.Int32Size(int32(p.MyNID)) + msgpack.Int32Size(int32(p.YourNID))
} }
func (p *AcceptIdentification) neoMsgEncodeM(data []byte) { func (p *AcceptIdentification) neoMsgEncodeM(data []byte) {
...@@ -503,11 +503,11 @@ func (p *AcceptIdentification) neoMsgEncodeM(data []byte) { ...@@ -503,11 +503,11 @@ func (p *AcceptIdentification) neoMsgEncodeM(data []byte) {
} }
data[3] = byte(p.NodeType) data[3] = byte(p.NodeType)
{ {
n := msgpack.PutInt32(data[4:], int32(p.MyUUID)) n := msgpack.PutInt32(data[4:], int32(p.MyNID))
data = data[4+n:] data = data[4+n:]
} }
{ {
n := msgpack.PutInt32(data[0:], int32(p.YourUUID)) n := msgpack.PutInt32(data[0:], int32(p.YourNID))
data = data[0+n:] data = data[0+n:]
} }
} }
...@@ -537,18 +537,18 @@ func (p *AcceptIdentification) neoMsgDecodeM(data []byte) (int, error) { ...@@ -537,18 +537,18 @@ func (p *AcceptIdentification) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AcceptIdentification.MyUUID", err) return 0, mdecodeErr("AcceptIdentification.MyNID", err)
} }
p.MyUUID = NodeUUID(v) p.MyNID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AcceptIdentification.YourUUID", err) return 0, mdecodeErr("AcceptIdentification.YourNID", err)
} }
p.YourUUID = NodeUUID(v) p.YourNID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -721,14 +721,14 @@ func (p *AnswerPrimary) neoMsgEncodedLenN() int { ...@@ -721,14 +721,14 @@ func (p *AnswerPrimary) neoMsgEncodedLenN() int {
} }
func (p *AnswerPrimary) neoMsgEncodeN(data []byte) { func (p *AnswerPrimary) neoMsgEncodeN(data []byte) {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.PrimaryNodeUUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.PrimaryNodeID)))
} }
func (p *AnswerPrimary) neoMsgDecodeN(data []byte) (int, error) { func (p *AnswerPrimary) neoMsgDecodeN(data []byte) (int, error) {
if len(data) < 4 { if len(data) < 4 {
goto overflow goto overflow
} }
p.PrimaryNodeUUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) p.PrimaryNodeID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
return 4, nil return 4, nil
overflow: overflow:
...@@ -736,13 +736,13 @@ overflow: ...@@ -736,13 +736,13 @@ overflow:
} }
func (p *AnswerPrimary) neoMsgEncodedLenM() int { func (p *AnswerPrimary) neoMsgEncodedLenM() int {
return 1 + msgpack.Int32Size(int32(p.PrimaryNodeUUID)) return 1 + msgpack.Int32Size(int32(p.PrimaryNodeID))
} }
func (p *AnswerPrimary) neoMsgEncodeM(data []byte) { func (p *AnswerPrimary) neoMsgEncodeM(data []byte) {
data[0] = byte(msgpack.FixArray_4 | 1) data[0] = byte(msgpack.FixArray_4 | 1)
{ {
n := msgpack.PutInt32(data[1:], int32(p.PrimaryNodeUUID)) n := msgpack.PutInt32(data[1:], int32(p.PrimaryNodeID))
data = data[1+n:] data = data[1+n:]
} }
} }
...@@ -759,9 +759,9 @@ func (p *AnswerPrimary) neoMsgDecodeM(data []byte) (int, error) { ...@@ -759,9 +759,9 @@ func (p *AnswerPrimary) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerPrimary.PrimaryNodeUUID", err) return 0, mdecodeErr("AnswerPrimary.PrimaryNodeID", err)
} }
p.PrimaryNodeUUID = NodeUUID(v) p.PrimaryNodeID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -807,7 +807,7 @@ func (p *NotPrimaryMaster) neoMsgDecodeN(data []byte) (int, error) { ...@@ -807,7 +807,7 @@ func (p *NotPrimaryMaster) neoMsgDecodeN(data []byte) (int, error) {
if len(data) < 8 { if len(data) < 8 {
goto overflow goto overflow
} }
p.Primary = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) p.Primary = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
{ {
l := binary.BigEndian.Uint32(data[4 : 4+4]) l := binary.BigEndian.Uint32(data[4 : 4+4])
data = data[8:] data = data[8:]
...@@ -882,7 +882,7 @@ func (p *NotPrimaryMaster) neoMsgDecodeM(data []byte) (int, error) { ...@@ -882,7 +882,7 @@ func (p *NotPrimaryMaster) neoMsgDecodeM(data []byte) (int, error) {
if err != nil { if err != nil {
return 0, mdecodeErr("NotPrimaryMaster.Primary", err) return 0, mdecodeErr("NotPrimaryMaster.Primary", err)
} }
p.Primary = NodeUUID(v) p.Primary = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -964,7 +964,7 @@ func (p *NotifyNodeInformation) neoMsgEncodeN(data []byte) { ...@@ -964,7 +964,7 @@ func (p *NotifyNodeInformation) neoMsgEncodeN(data []byte) {
n := (*a).Addr.neoEncodeN(data[1:]) n := (*a).Addr.neoEncodeN(data[1:])
data = data[1+n:] data = data[1+n:]
} }
binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).UUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
(data[4:])[0] = uint8(int8((*a).State)) (data[4:])[0] = uint8(int8((*a).State))
{ {
n := (*a).IdTime.neoEncodeN(data[5:]) n := (*a).IdTime.neoEncodeN(data[5:])
...@@ -1009,7 +1009,7 @@ func (p *NotifyNodeInformation) neoMsgDecodeN(data []byte) (int, error) { ...@@ -1009,7 +1009,7 @@ func (p *NotifyNodeInformation) neoMsgDecodeN(data []byte) (int, error) {
if len(data) < 5 { if len(data) < 5 {
goto overflow goto overflow
} }
(*a).UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
(*a).State = NodeState(int8((data[4 : 4+1])[0])) (*a).State = NodeState(int8((data[4 : 4+1])[0]))
data = data[5:] data = data[5:]
{ {
...@@ -1033,7 +1033,7 @@ func (p *NotifyNodeInformation) neoMsgEncodedLenM() int { ...@@ -1033,7 +1033,7 @@ func (p *NotifyNodeInformation) neoMsgEncodedLenM() int {
var size int var size int
for i := 0; i < len(p.NodeList); i++ { for i := 0; i < len(p.NodeList); i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
size += msgpack.BinHeadSize(len((*a).Addr.Host)) + len((*a).Addr.Host) + msgpack.Uint16Size((*a).Addr.Port) + msgpack.Int32Size(int32((*a).UUID)) size += msgpack.BinHeadSize(len((*a).Addr.Host)) + len((*a).Addr.Host) + msgpack.Uint16Size((*a).Addr.Port) + msgpack.Int32Size(int32((*a).NID))
} }
return 10 + msgpack.ArrayHeadSize(len(p.NodeList)) + len(p.NodeList)*17 + size return 10 + msgpack.ArrayHeadSize(len(p.NodeList)) + len(p.NodeList)*17 + size
} }
...@@ -1068,7 +1068,7 @@ func (p *NotifyNodeInformation) neoMsgEncodeM(data []byte) { ...@@ -1068,7 +1068,7 @@ func (p *NotifyNodeInformation) neoMsgEncodeM(data []byte) {
data = data[0+n:] data = data[0+n:]
} }
{ {
n := msgpack.PutInt32(data[0:], int32((*a).UUID)) n := msgpack.PutInt32(data[0:], int32((*a).NID))
data = data[0+n:] data = data[0+n:]
} }
data[0] = byte(msgpack.FixExt1) data[0] = byte(msgpack.FixExt1)
...@@ -1156,9 +1156,9 @@ func (p *NotifyNodeInformation) neoMsgDecodeM(data []byte) (int, error) { ...@@ -1156,9 +1156,9 @@ func (p *NotifyNodeInformation) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("NotifyNodeInformation.UUID", err) return 0, mdecodeErr("NotifyNodeInformation.NID", err)
} }
(*a).UUID = NodeUUID(v) (*a).NID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -1497,7 +1497,7 @@ func (p *AnswerPartitionTable) neoMsgEncodeN(data []byte) { ...@@ -1497,7 +1497,7 @@ func (p *AnswerPartitionTable) neoMsgEncodeN(data []byte) {
data = data[4:] data = data[4:]
for i := 0; i < l; i++ { for i := 0; i < l; i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).UUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
(data[4:])[0] = uint8(int8((*a).State)) (data[4:])[0] = uint8(int8((*a).State))
data = data[5:] data = data[5:]
} }
...@@ -1532,7 +1532,7 @@ func (p *AnswerPartitionTable) neoMsgDecodeN(data []byte) (int, error) { ...@@ -1532,7 +1532,7 @@ func (p *AnswerPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
(*a).CellList = make([]CellInfo, l) (*a).CellList = make([]CellInfo, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
(*a).UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
(*a).State = CellState(int8((data[4 : 4+1])[0])) (*a).State = CellState(int8((data[4 : 4+1])[0]))
data = data[5:] data = data[5:]
} }
...@@ -1552,7 +1552,7 @@ func (p *AnswerPartitionTable) neoMsgEncodedLenM() int { ...@@ -1552,7 +1552,7 @@ func (p *AnswerPartitionTable) neoMsgEncodedLenM() int {
a := &p.RowList[i] a := &p.RowList[i]
for i := 0; i < len((*a).CellList); i++ { for i := 0; i < len((*a).CellList); i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
size += msgpack.Int32Size(int32((*a).UUID)) size += msgpack.Int32Size(int32((*a).NID))
} }
size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4 size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4
} }
...@@ -1584,7 +1584,7 @@ func (p *AnswerPartitionTable) neoMsgEncodeM(data []byte) { ...@@ -1584,7 +1584,7 @@ func (p *AnswerPartitionTable) neoMsgEncodeM(data []byte) {
a := &(*a).CellList[i] a := &(*a).CellList[i]
data[0] = byte(msgpack.FixArray_4 | 2) data[0] = byte(msgpack.FixArray_4 | 2)
{ {
n := msgpack.PutInt32(data[1:], int32((*a).UUID)) n := msgpack.PutInt32(data[1:], int32((*a).NID))
data = data[1+n:] data = data[1+n:]
} }
data[0] = byte(msgpack.FixExt1) data[0] = byte(msgpack.FixExt1)
...@@ -1664,9 +1664,9 @@ func (p *AnswerPartitionTable) neoMsgDecodeM(data []byte) (int, error) { ...@@ -1664,9 +1664,9 @@ func (p *AnswerPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerPartitionTable.UUID", err) return 0, mdecodeErr("AnswerPartitionTable.NID", err)
} }
(*a).UUID = NodeUUID(v) (*a).NID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -1729,7 +1729,7 @@ func (p *SendPartitionTable) neoMsgEncodeN(data []byte) { ...@@ -1729,7 +1729,7 @@ func (p *SendPartitionTable) neoMsgEncodeN(data []byte) {
data = data[4:] data = data[4:]
for i := 0; i < l; i++ { for i := 0; i < l; i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).UUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
(data[4:])[0] = uint8(int8((*a).State)) (data[4:])[0] = uint8(int8((*a).State))
data = data[5:] data = data[5:]
} }
...@@ -1764,7 +1764,7 @@ func (p *SendPartitionTable) neoMsgDecodeN(data []byte) (int, error) { ...@@ -1764,7 +1764,7 @@ func (p *SendPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
(*a).CellList = make([]CellInfo, l) (*a).CellList = make([]CellInfo, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
(*a).UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
(*a).State = CellState(int8((data[4 : 4+1])[0])) (*a).State = CellState(int8((data[4 : 4+1])[0]))
data = data[5:] data = data[5:]
} }
...@@ -1784,7 +1784,7 @@ func (p *SendPartitionTable) neoMsgEncodedLenM() int { ...@@ -1784,7 +1784,7 @@ func (p *SendPartitionTable) neoMsgEncodedLenM() int {
a := &p.RowList[i] a := &p.RowList[i]
for i := 0; i < len((*a).CellList); i++ { for i := 0; i < len((*a).CellList); i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
size += msgpack.Int32Size(int32((*a).UUID)) size += msgpack.Int32Size(int32((*a).NID))
} }
size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4 size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4
} }
...@@ -1816,7 +1816,7 @@ func (p *SendPartitionTable) neoMsgEncodeM(data []byte) { ...@@ -1816,7 +1816,7 @@ func (p *SendPartitionTable) neoMsgEncodeM(data []byte) {
a := &(*a).CellList[i] a := &(*a).CellList[i]
data[0] = byte(msgpack.FixArray_4 | 2) data[0] = byte(msgpack.FixArray_4 | 2)
{ {
n := msgpack.PutInt32(data[1:], int32((*a).UUID)) n := msgpack.PutInt32(data[1:], int32((*a).NID))
data = data[1+n:] data = data[1+n:]
} }
data[0] = byte(msgpack.FixExt1) data[0] = byte(msgpack.FixExt1)
...@@ -1896,9 +1896,9 @@ func (p *SendPartitionTable) neoMsgDecodeM(data []byte) (int, error) { ...@@ -1896,9 +1896,9 @@ func (p *SendPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("SendPartitionTable.UUID", err) return 0, mdecodeErr("SendPartitionTable.NID", err)
} }
(*a).UUID = NodeUUID(v) (*a).NID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -1951,7 +1951,7 @@ func (p *NotifyPartitionChanges) neoMsgEncodeN(data []byte) { ...@@ -1951,7 +1951,7 @@ func (p *NotifyPartitionChanges) neoMsgEncodeN(data []byte) {
for i := 0; i < l; i++ { for i := 0; i < l; i++ {
a := &p.CellList[i] a := &p.CellList[i]
binary.BigEndian.PutUint32(data[0:], (*a).Offset) binary.BigEndian.PutUint32(data[0:], (*a).Offset)
binary.BigEndian.PutUint32(data[4:], uint32(int32((*a).CellInfo.UUID))) binary.BigEndian.PutUint32(data[4:], uint32(int32((*a).CellInfo.NID)))
(data[8:])[0] = uint8(int8((*a).CellInfo.State)) (data[8:])[0] = uint8(int8((*a).CellInfo.State))
data = data[9:] data = data[9:]
} }
...@@ -1979,7 +1979,7 @@ func (p *NotifyPartitionChanges) neoMsgDecodeN(data []byte) (int, error) { ...@@ -1979,7 +1979,7 @@ func (p *NotifyPartitionChanges) neoMsgDecodeN(data []byte) (int, error) {
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.CellList[i] a := &p.CellList[i]
(*a).Offset = binary.BigEndian.Uint32(data[0 : 0+4]) (*a).Offset = binary.BigEndian.Uint32(data[0 : 0+4])
(*a).CellInfo.UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[4 : 4+4]))) (*a).CellInfo.NID = NodeID(int32(binary.BigEndian.Uint32(data[4 : 4+4])))
(*a).CellInfo.State = CellState(int8((data[8 : 8+1])[0])) (*a).CellInfo.State = CellState(int8((data[8 : 8+1])[0]))
data = data[9:] data = data[9:]
} }
...@@ -1994,7 +1994,7 @@ func (p *NotifyPartitionChanges) neoMsgEncodedLenM() int { ...@@ -1994,7 +1994,7 @@ func (p *NotifyPartitionChanges) neoMsgEncodedLenM() int {
var size int var size int
for i := 0; i < len(p.CellList); i++ { for i := 0; i < len(p.CellList); i++ {
a := &p.CellList[i] a := &p.CellList[i]
size += msgpack.Uint32Size((*a).Offset) + msgpack.Int32Size(int32((*a).CellInfo.UUID)) size += msgpack.Uint32Size((*a).Offset) + msgpack.Int32Size(int32((*a).CellInfo.NID))
} }
return 1 + msgpack.Uint64Size(uint64(p.PTid)) + msgpack.Uint32Size(p.NumReplicas) + msgpack.ArrayHeadSize(len(p.CellList)) + len(p.CellList)*5 + size return 1 + msgpack.Uint64Size(uint64(p.PTid)) + msgpack.Uint32Size(p.NumReplicas) + msgpack.ArrayHeadSize(len(p.CellList)) + len(p.CellList)*5 + size
} }
...@@ -2022,7 +2022,7 @@ func (p *NotifyPartitionChanges) neoMsgEncodeM(data []byte) { ...@@ -2022,7 +2022,7 @@ func (p *NotifyPartitionChanges) neoMsgEncodeM(data []byte) {
} }
data[0] = byte(msgpack.FixArray_4 | 2) data[0] = byte(msgpack.FixArray_4 | 2)
{ {
n := msgpack.PutInt32(data[1:], int32((*a).CellInfo.UUID)) n := msgpack.PutInt32(data[1:], int32((*a).CellInfo.NID))
data = data[1+n:] data = data[1+n:]
} }
data[0] = byte(msgpack.FixExt1) data[0] = byte(msgpack.FixExt1)
...@@ -2102,9 +2102,9 @@ func (p *NotifyPartitionChanges) neoMsgDecodeM(data []byte) (int, error) { ...@@ -2102,9 +2102,9 @@ func (p *NotifyPartitionChanges) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("NotifyPartitionChanges.CellInfo.UUID", err) return 0, mdecodeErr("NotifyPartitionChanges.CellInfo.NID", err)
} }
(*a).CellInfo.UUID = NodeUUID(v) (*a).CellInfo.NID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -2964,10 +2964,10 @@ func (p *FailedVote) neoMsgDecodeN(data []byte) (int, error) { ...@@ -2964,10 +2964,10 @@ func (p *FailedVote) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
nread += uint64(l) * 4 nread += uint64(l) * 4
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
(*a) = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
data = data[4:] data = data[4:]
} }
} }
...@@ -3028,7 +3028,7 @@ func (p *FailedVote) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3028,7 +3028,7 @@ func (p *FailedVote) neoMsgDecodeM(data []byte) (int, error) {
} }
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
{ {
...@@ -3036,7 +3036,7 @@ func (p *FailedVote) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3036,7 +3036,7 @@ func (p *FailedVote) neoMsgDecodeM(data []byte) (int, error) {
if err != nil { if err != nil {
return 0, mdecodeErr("FailedVote", err) return 0, mdecodeErr("FailedVote", err)
} }
(*a) = NodeUUID(v) (*a) = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -4451,10 +4451,10 @@ func (p *AbortTransaction) neoMsgDecodeN(data []byte) (int, error) { ...@@ -4451,10 +4451,10 @@ func (p *AbortTransaction) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
nread += uint64(l) * 4 nread += uint64(l) * 4
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
(*a) = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
data = data[4:] data = data[4:]
} }
} }
...@@ -4515,7 +4515,7 @@ func (p *AbortTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4515,7 +4515,7 @@ func (p *AbortTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
{ {
...@@ -4523,7 +4523,7 @@ func (p *AbortTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4523,7 +4523,7 @@ func (p *AbortTransaction) neoMsgDecodeM(data []byte) (int, error) {
if err != nil { if err != nil {
return 0, mdecodeErr("AbortTransaction", err) return 0, mdecodeErr("AbortTransaction", err)
} }
(*a) = NodeUUID(v) (*a) = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -5857,7 +5857,7 @@ func (p *PartitionList) neoMsgEncodedLenN() int { ...@@ -5857,7 +5857,7 @@ func (p *PartitionList) neoMsgEncodedLenN() int {
func (p *PartitionList) neoMsgEncodeN(data []byte) { func (p *PartitionList) neoMsgEncodeN(data []byte) {
binary.BigEndian.PutUint32(data[0:], p.MinOffset) binary.BigEndian.PutUint32(data[0:], p.MinOffset)
binary.BigEndian.PutUint32(data[4:], p.MaxOffset) binary.BigEndian.PutUint32(data[4:], p.MaxOffset)
binary.BigEndian.PutUint32(data[8:], uint32(int32(p.NodeUUID))) binary.BigEndian.PutUint32(data[8:], uint32(int32(p.NodeID)))
} }
func (p *PartitionList) neoMsgDecodeN(data []byte) (int, error) { func (p *PartitionList) neoMsgDecodeN(data []byte) (int, error) {
...@@ -5866,7 +5866,7 @@ func (p *PartitionList) neoMsgDecodeN(data []byte) (int, error) { ...@@ -5866,7 +5866,7 @@ func (p *PartitionList) neoMsgDecodeN(data []byte) (int, error) {
} }
p.MinOffset = binary.BigEndian.Uint32(data[0 : 0+4]) p.MinOffset = binary.BigEndian.Uint32(data[0 : 0+4])
p.MaxOffset = binary.BigEndian.Uint32(data[4 : 4+4]) p.MaxOffset = binary.BigEndian.Uint32(data[4 : 4+4])
p.NodeUUID = NodeUUID(int32(binary.BigEndian.Uint32(data[8 : 8+4]))) p.NodeID = NodeID(int32(binary.BigEndian.Uint32(data[8 : 8+4])))
return 12, nil return 12, nil
overflow: overflow:
...@@ -5874,7 +5874,7 @@ overflow: ...@@ -5874,7 +5874,7 @@ overflow:
} }
func (p *PartitionList) neoMsgEncodedLenM() int { func (p *PartitionList) neoMsgEncodedLenM() int {
return 1 + msgpack.Uint32Size(p.MinOffset) + msgpack.Uint32Size(p.MaxOffset) + msgpack.Int32Size(int32(p.NodeUUID)) return 1 + msgpack.Uint32Size(p.MinOffset) + msgpack.Uint32Size(p.MaxOffset) + msgpack.Int32Size(int32(p.NodeID))
} }
func (p *PartitionList) neoMsgEncodeM(data []byte) { func (p *PartitionList) neoMsgEncodeM(data []byte) {
...@@ -5888,7 +5888,7 @@ func (p *PartitionList) neoMsgEncodeM(data []byte) { ...@@ -5888,7 +5888,7 @@ func (p *PartitionList) neoMsgEncodeM(data []byte) {
data = data[0+n:] data = data[0+n:]
} }
{ {
n := msgpack.PutInt32(data[0:], int32(p.NodeUUID)) n := msgpack.PutInt32(data[0:], int32(p.NodeID))
data = data[0+n:] data = data[0+n:]
} }
} }
...@@ -5923,9 +5923,9 @@ func (p *PartitionList) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5923,9 +5923,9 @@ func (p *PartitionList) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("PartitionList.NodeUUID", err) return 0, mdecodeErr("PartitionList.NodeID", err)
} }
p.NodeUUID = NodeUUID(v) p.NodeID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -5965,7 +5965,7 @@ func (p *AnswerPartitionList) neoMsgEncodeN(data []byte) { ...@@ -5965,7 +5965,7 @@ func (p *AnswerPartitionList) neoMsgEncodeN(data []byte) {
data = data[4:] data = data[4:]
for i := 0; i < l; i++ { for i := 0; i < l; i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).UUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
(data[4:])[0] = uint8(int8((*a).State)) (data[4:])[0] = uint8(int8((*a).State))
data = data[5:] data = data[5:]
} }
...@@ -6000,7 +6000,7 @@ func (p *AnswerPartitionList) neoMsgDecodeN(data []byte) (int, error) { ...@@ -6000,7 +6000,7 @@ func (p *AnswerPartitionList) neoMsgDecodeN(data []byte) (int, error) {
(*a).CellList = make([]CellInfo, l) (*a).CellList = make([]CellInfo, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
(*a).UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
(*a).State = CellState(int8((data[4 : 4+1])[0])) (*a).State = CellState(int8((data[4 : 4+1])[0]))
data = data[5:] data = data[5:]
} }
...@@ -6020,7 +6020,7 @@ func (p *AnswerPartitionList) neoMsgEncodedLenM() int { ...@@ -6020,7 +6020,7 @@ func (p *AnswerPartitionList) neoMsgEncodedLenM() int {
a := &p.RowList[i] a := &p.RowList[i]
for i := 0; i < len((*a).CellList); i++ { for i := 0; i < len((*a).CellList); i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
size += msgpack.Int32Size(int32((*a).UUID)) size += msgpack.Int32Size(int32((*a).NID))
} }
size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4 size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4
} }
...@@ -6052,7 +6052,7 @@ func (p *AnswerPartitionList) neoMsgEncodeM(data []byte) { ...@@ -6052,7 +6052,7 @@ func (p *AnswerPartitionList) neoMsgEncodeM(data []byte) {
a := &(*a).CellList[i] a := &(*a).CellList[i]
data[0] = byte(msgpack.FixArray_4 | 2) data[0] = byte(msgpack.FixArray_4 | 2)
{ {
n := msgpack.PutInt32(data[1:], int32((*a).UUID)) n := msgpack.PutInt32(data[1:], int32((*a).NID))
data = data[1+n:] data = data[1+n:]
} }
data[0] = byte(msgpack.FixExt1) data[0] = byte(msgpack.FixExt1)
...@@ -6132,9 +6132,9 @@ func (p *AnswerPartitionList) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6132,9 +6132,9 @@ func (p *AnswerPartitionList) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerPartitionList.UUID", err) return 0, mdecodeErr("AnswerPartitionList.NID", err)
} }
(*a).UUID = NodeUUID(v) (*a).NID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -6259,7 +6259,7 @@ func (p *AnswerNodeList) neoMsgEncodeN(data []byte) { ...@@ -6259,7 +6259,7 @@ func (p *AnswerNodeList) neoMsgEncodeN(data []byte) {
n := (*a).Addr.neoEncodeN(data[1:]) n := (*a).Addr.neoEncodeN(data[1:])
data = data[1+n:] data = data[1+n:]
} }
binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).UUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
(data[4:])[0] = uint8(int8((*a).State)) (data[4:])[0] = uint8(int8((*a).State))
{ {
n := (*a).IdTime.neoEncodeN(data[5:]) n := (*a).IdTime.neoEncodeN(data[5:])
...@@ -6296,7 +6296,7 @@ func (p *AnswerNodeList) neoMsgDecodeN(data []byte) (int, error) { ...@@ -6296,7 +6296,7 @@ func (p *AnswerNodeList) neoMsgDecodeN(data []byte) (int, error) {
if len(data) < 5 { if len(data) < 5 {
goto overflow goto overflow
} }
(*a).UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
(*a).State = NodeState(int8((data[4 : 4+1])[0])) (*a).State = NodeState(int8((data[4 : 4+1])[0]))
data = data[5:] data = data[5:]
{ {
...@@ -6320,7 +6320,7 @@ func (p *AnswerNodeList) neoMsgEncodedLenM() int { ...@@ -6320,7 +6320,7 @@ func (p *AnswerNodeList) neoMsgEncodedLenM() int {
var size int var size int
for i := 0; i < len(p.NodeList); i++ { for i := 0; i < len(p.NodeList); i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
size += msgpack.BinHeadSize(len((*a).Addr.Host)) + len((*a).Addr.Host) + msgpack.Uint16Size((*a).Addr.Port) + msgpack.Int32Size(int32((*a).UUID)) size += msgpack.BinHeadSize(len((*a).Addr.Host)) + len((*a).Addr.Host) + msgpack.Uint16Size((*a).Addr.Port) + msgpack.Int32Size(int32((*a).NID))
} }
return 1 + msgpack.ArrayHeadSize(len(p.NodeList)) + len(p.NodeList)*17 + size return 1 + msgpack.ArrayHeadSize(len(p.NodeList)) + len(p.NodeList)*17 + size
} }
...@@ -6353,7 +6353,7 @@ func (p *AnswerNodeList) neoMsgEncodeM(data []byte) { ...@@ -6353,7 +6353,7 @@ func (p *AnswerNodeList) neoMsgEncodeM(data []byte) {
data = data[0+n:] data = data[0+n:]
} }
{ {
n := msgpack.PutInt32(data[0:], int32((*a).UUID)) n := msgpack.PutInt32(data[0:], int32((*a).NID))
data = data[0+n:] data = data[0+n:]
} }
data[0] = byte(msgpack.FixExt1) data[0] = byte(msgpack.FixExt1)
...@@ -6432,9 +6432,9 @@ func (p *AnswerNodeList) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6432,9 +6432,9 @@ func (p *AnswerNodeList) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerNodeList.UUID", err) return 0, mdecodeErr("AnswerNodeList.NID", err)
} }
(*a).UUID = NodeUUID(v) (*a).NID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -6484,7 +6484,7 @@ func (p *SetNodeState) neoMsgEncodedLenN() int { ...@@ -6484,7 +6484,7 @@ func (p *SetNodeState) neoMsgEncodedLenN() int {
} }
func (p *SetNodeState) neoMsgEncodeN(data []byte) { func (p *SetNodeState) neoMsgEncodeN(data []byte) {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeUUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeID)))
(data[4:])[0] = uint8(int8(p.NodeState)) (data[4:])[0] = uint8(int8(p.NodeState))
} }
...@@ -6492,7 +6492,7 @@ func (p *SetNodeState) neoMsgDecodeN(data []byte) (int, error) { ...@@ -6492,7 +6492,7 @@ func (p *SetNodeState) neoMsgDecodeN(data []byte) (int, error) {
if len(data) < 5 { if len(data) < 5 {
goto overflow goto overflow
} }
p.NodeUUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) p.NodeID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
p.NodeState = NodeState(int8((data[4 : 4+1])[0])) p.NodeState = NodeState(int8((data[4 : 4+1])[0]))
return 5, nil return 5, nil
...@@ -6501,13 +6501,13 @@ overflow: ...@@ -6501,13 +6501,13 @@ overflow:
} }
func (p *SetNodeState) neoMsgEncodedLenM() int { func (p *SetNodeState) neoMsgEncodedLenM() int {
return 4 + msgpack.Int32Size(int32(p.NodeUUID)) return 4 + msgpack.Int32Size(int32(p.NodeID))
} }
func (p *SetNodeState) neoMsgEncodeM(data []byte) { func (p *SetNodeState) neoMsgEncodeM(data []byte) {
data[0] = byte(msgpack.FixArray_4 | 2) data[0] = byte(msgpack.FixArray_4 | 2)
{ {
n := msgpack.PutInt32(data[1:], int32(p.NodeUUID)) n := msgpack.PutInt32(data[1:], int32(p.NodeID))
data = data[1+n:] data = data[1+n:]
} }
data[0] = byte(msgpack.FixExt1) data[0] = byte(msgpack.FixExt1)
...@@ -6530,9 +6530,9 @@ func (p *SetNodeState) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6530,9 +6530,9 @@ func (p *SetNodeState) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("SetNodeState.NodeUUID", err) return 0, mdecodeErr("SetNodeState.NodeID", err)
} }
p.NodeUUID = NodeUUID(v) p.NodeID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -6593,10 +6593,10 @@ func (p *AddPendingNodes) neoMsgDecodeN(data []byte) (int, error) { ...@@ -6593,10 +6593,10 @@ func (p *AddPendingNodes) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
nread += uint64(l) * 4 nread += uint64(l) * 4
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
(*a) = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
data = data[4:] data = data[4:]
} }
} }
...@@ -6647,7 +6647,7 @@ func (p *AddPendingNodes) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6647,7 +6647,7 @@ func (p *AddPendingNodes) neoMsgDecodeM(data []byte) (int, error) {
} }
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
{ {
...@@ -6655,7 +6655,7 @@ func (p *AddPendingNodes) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6655,7 +6655,7 @@ func (p *AddPendingNodes) neoMsgDecodeM(data []byte) (int, error) {
if err != nil { if err != nil {
return 0, mdecodeErr("AddPendingNodes", err) return 0, mdecodeErr("AddPendingNodes", err)
} }
(*a) = NodeUUID(v) (*a) = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -6704,10 +6704,10 @@ func (p *TweakPartitionTable) neoMsgDecodeN(data []byte) (int, error) { ...@@ -6704,10 +6704,10 @@ func (p *TweakPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
nread += uint64(l) * 4 nread += uint64(l) * 4
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
(*a) = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
data = data[4:] data = data[4:]
} }
} }
...@@ -6767,7 +6767,7 @@ func (p *TweakPartitionTable) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6767,7 +6767,7 @@ func (p *TweakPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
} }
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
{ {
...@@ -6775,7 +6775,7 @@ func (p *TweakPartitionTable) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6775,7 +6775,7 @@ func (p *TweakPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
if err != nil { if err != nil {
return 0, mdecodeErr("TweakPartitionTable", err) return 0, mdecodeErr("TweakPartitionTable", err)
} }
(*a) = NodeUUID(v) (*a) = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -6816,7 +6816,7 @@ func (p *AnswerTweakPartitionTable) neoMsgEncodeN(data []byte) { ...@@ -6816,7 +6816,7 @@ func (p *AnswerTweakPartitionTable) neoMsgEncodeN(data []byte) {
data = data[4:] data = data[4:]
for i := 0; i < l; i++ { for i := 0; i < l; i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).UUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32((*a).NID)))
(data[4:])[0] = uint8(int8((*a).State)) (data[4:])[0] = uint8(int8((*a).State))
data = data[5:] data = data[5:]
} }
...@@ -6850,7 +6850,7 @@ func (p *AnswerTweakPartitionTable) neoMsgDecodeN(data []byte) (int, error) { ...@@ -6850,7 +6850,7 @@ func (p *AnswerTweakPartitionTable) neoMsgDecodeN(data []byte) (int, error) {
(*a).CellList = make([]CellInfo, l) (*a).CellList = make([]CellInfo, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
(*a).UUID = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a).NID = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
(*a).State = CellState(int8((data[4 : 4+1])[0])) (*a).State = CellState(int8((data[4 : 4+1])[0]))
data = data[5:] data = data[5:]
} }
...@@ -6870,7 +6870,7 @@ func (p *AnswerTweakPartitionTable) neoMsgEncodedLenM() int { ...@@ -6870,7 +6870,7 @@ func (p *AnswerTweakPartitionTable) neoMsgEncodedLenM() int {
a := &p.RowList[i] a := &p.RowList[i]
for i := 0; i < len((*a).CellList); i++ { for i := 0; i < len((*a).CellList); i++ {
a := &(*a).CellList[i] a := &(*a).CellList[i]
size += msgpack.Int32Size(int32((*a).UUID)) size += msgpack.Int32Size(int32((*a).NID))
} }
size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4 size += msgpack.ArrayHeadSize(len((*a).CellList)) + len((*a).CellList)*4
} }
...@@ -6895,7 +6895,7 @@ func (p *AnswerTweakPartitionTable) neoMsgEncodeM(data []byte) { ...@@ -6895,7 +6895,7 @@ func (p *AnswerTweakPartitionTable) neoMsgEncodeM(data []byte) {
a := &(*a).CellList[i] a := &(*a).CellList[i]
data[0] = byte(msgpack.FixArray_4 | 2) data[0] = byte(msgpack.FixArray_4 | 2)
{ {
n := msgpack.PutInt32(data[1:], int32((*a).UUID)) n := msgpack.PutInt32(data[1:], int32((*a).NID))
data = data[1+n:] data = data[1+n:]
} }
data[0] = byte(msgpack.FixExt1) data[0] = byte(msgpack.FixExt1)
...@@ -6965,9 +6965,9 @@ func (p *AnswerTweakPartitionTable) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6965,9 +6965,9 @@ func (p *AnswerTweakPartitionTable) neoMsgDecodeM(data []byte) (int, error) {
{ {
v, tail, err := msgp.ReadInt32Bytes(data) v, tail, err := msgp.ReadInt32Bytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerTweakPartitionTable.UUID", err) return 0, mdecodeErr("AnswerTweakPartitionTable.NID", err)
} }
(*a).UUID = NodeUUID(v) (*a).NID = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -7162,10 +7162,10 @@ func (p *Repair) neoMsgDecodeN(data []byte) (int, error) { ...@@ -7162,10 +7162,10 @@ func (p *Repair) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
nread += 1 + uint64(l)*4 nread += 1 + uint64(l)*4
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
(*a) = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
data = data[4:] data = data[4:]
} }
} }
...@@ -7219,7 +7219,7 @@ func (p *Repair) neoMsgDecodeM(data []byte) (int, error) { ...@@ -7219,7 +7219,7 @@ func (p *Repair) neoMsgDecodeM(data []byte) (int, error) {
} }
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
p.NodeList = make([]NodeUUID, l) p.NodeList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.NodeList[i] a := &p.NodeList[i]
{ {
...@@ -7227,7 +7227,7 @@ func (p *Repair) neoMsgDecodeM(data []byte) (int, error) { ...@@ -7227,7 +7227,7 @@ func (p *Repair) neoMsgDecodeM(data []byte) (int, error) {
if err != nil { if err != nil {
return 0, mdecodeErr("Repair", err) return 0, mdecodeErr("Repair", err)
} }
(*a) = NodeUUID(v) (*a) = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -8159,12 +8159,12 @@ func (p *CheckReplicas) neoMsgDecodeN(data []byte) (int, error) { ...@@ -8159,12 +8159,12 @@ func (p *CheckReplicas) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
nread += 16 + uint64(l)*8 nread += 16 + uint64(l)*8
p.PartitionDict = make(map[uint32]NodeUUID, l) p.PartitionDict = make(map[uint32]NodeID, l)
m := p.PartitionDict m := p.PartitionDict
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
var key uint32 var key uint32
key = binary.BigEndian.Uint32(data[0 : 0+4]) key = binary.BigEndian.Uint32(data[0 : 0+4])
m[key] = NodeUUID(int32(binary.BigEndian.Uint32(data[4 : 4+4]))) m[key] = NodeID(int32(binary.BigEndian.Uint32(data[4 : 4+4])))
data = data[8:] data = data[8:]
} }
} }
...@@ -8230,7 +8230,7 @@ func (p *CheckReplicas) neoMsgDecodeM(data []byte) (int, error) { ...@@ -8230,7 +8230,7 @@ func (p *CheckReplicas) neoMsgDecodeM(data []byte) (int, error) {
} }
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
p.PartitionDict = make(map[uint32]NodeUUID, l) p.PartitionDict = make(map[uint32]NodeID, l)
m := p.PartitionDict m := p.PartitionDict
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
var key uint32 var key uint32
...@@ -8248,7 +8248,7 @@ func (p *CheckReplicas) neoMsgDecodeM(data []byte) (int, error) { ...@@ -8248,7 +8248,7 @@ func (p *CheckReplicas) neoMsgDecodeM(data []byte) (int, error) {
if err != nil { if err != nil {
return 0, mdecodeErr("CheckReplicas", err) return 0, mdecodeErr("CheckReplicas", err)
} }
m[key] = NodeUUID(v) m[key] = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
...@@ -8914,10 +8914,10 @@ func (p *PartitionCorrupted) neoMsgDecodeN(data []byte) (int, error) { ...@@ -8914,10 +8914,10 @@ func (p *PartitionCorrupted) neoMsgDecodeN(data []byte) (int, error) {
goto overflow goto overflow
} }
nread += uint64(l) * 4 nread += uint64(l) * 4
p.CellList = make([]NodeUUID, l) p.CellList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.CellList[i] a := &p.CellList[i]
(*a) = NodeUUID(int32(binary.BigEndian.Uint32(data[0 : 0+4]))) (*a) = NodeID(int32(binary.BigEndian.Uint32(data[0 : 0+4])))
data = data[4:] data = data[4:]
} }
} }
...@@ -8981,7 +8981,7 @@ func (p *PartitionCorrupted) neoMsgDecodeM(data []byte) (int, error) { ...@@ -8981,7 +8981,7 @@ func (p *PartitionCorrupted) neoMsgDecodeM(data []byte) (int, error) {
} }
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
p.CellList = make([]NodeUUID, l) p.CellList = make([]NodeID, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.CellList[i] a := &p.CellList[i]
{ {
...@@ -8989,7 +8989,7 @@ func (p *PartitionCorrupted) neoMsgDecodeM(data []byte) (int, error) { ...@@ -8989,7 +8989,7 @@ func (p *PartitionCorrupted) neoMsgDecodeM(data []byte) (int, error) {
if err != nil { if err != nil {
return 0, mdecodeErr("PartitionCorrupted", err) return 0, mdecodeErr("PartitionCorrupted", err)
} }
(*a) = NodeUUID(v) (*a) = NodeID(v)
nread += uint64(len(data) - len(tail)) nread += uint64(len(data) - len(tail))
data = tail data = tail
} }
......
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