Commit 27a72fd2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 776e85be
...@@ -382,8 +382,7 @@ type AnswerPartitionTable struct { ...@@ -382,8 +382,7 @@ type AnswerPartitionTable struct {
} }
// Send whole partition table to update other nodes. PM -> S, C. // Send whole partition table to update other nodes. PM -> S, C.
// XXX py: named also as SendPartitionTable type SendPartitionTable struct {
type NotifyPartitionTable struct {
PTid PTid
RowList []RowInfo RowList []RowInfo
} }
......
...@@ -588,13 +588,13 @@ overflow: ...@@ -588,13 +588,13 @@ overflow:
return 0, ErrDecodeOverflow return 0, ErrDecodeOverflow
} }
// 16. NotifyPartitionTable // 16. SendPartitionTable
func (*NotifyPartitionTable) neoMsgCode() uint16 { func (*SendPartitionTable) neoMsgCode() uint16 {
return 16 return 16
} }
func (p *NotifyPartitionTable) neoMsgEncodedLen() int { func (p *SendPartitionTable) neoMsgEncodedLen() int {
var size int var size int
for i := 0; i < len(p.RowList); i++ { for i := 0; i < len(p.RowList); i++ {
a := &p.RowList[i] a := &p.RowList[i]
...@@ -603,7 +603,7 @@ func (p *NotifyPartitionTable) neoMsgEncodedLen() int { ...@@ -603,7 +603,7 @@ func (p *NotifyPartitionTable) neoMsgEncodedLen() int {
return 12 + len(p.RowList)*8 + size return 12 + len(p.RowList)*8 + size
} }
func (p *NotifyPartitionTable) neoMsgEncode(data []byte) { func (p *SendPartitionTable) neoMsgEncode(data []byte) {
binary.BigEndian.PutUint64(data[0:], uint64(p.PTid)) binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
{ {
l := uint32(len(p.RowList)) l := uint32(len(p.RowList))
...@@ -628,7 +628,7 @@ func (p *NotifyPartitionTable) neoMsgEncode(data []byte) { ...@@ -628,7 +628,7 @@ func (p *NotifyPartitionTable) neoMsgEncode(data []byte) {
} }
} }
func (p *NotifyPartitionTable) neoMsgDecode(data []byte) (int, error) { func (p *SendPartitionTable) neoMsgDecode(data []byte) (int, error) {
var nread uint32 var nread uint32
if uint32(len(data)) < 12 { if uint32(len(data)) < 12 {
goto overflow goto overflow
...@@ -3455,7 +3455,7 @@ var msgTypeRegistry = map[uint16]reflect.Type{ ...@@ -3455,7 +3455,7 @@ var msgTypeRegistry = map[uint16]reflect.Type{
13 | answerBit: reflect.TypeOf(AnswerLastIDs{}), 13 | answerBit: reflect.TypeOf(AnswerLastIDs{}),
14: reflect.TypeOf(AskPartitionTable{}), 14: reflect.TypeOf(AskPartitionTable{}),
15 | answerBit: reflect.TypeOf(AnswerPartitionTable{}), 15 | answerBit: reflect.TypeOf(AnswerPartitionTable{}),
16: reflect.TypeOf(NotifyPartitionTable{}), 16: reflect.TypeOf(SendPartitionTable{}),
17: reflect.TypeOf(NotifyPartitionChanges{}), 17: reflect.TypeOf(NotifyPartitionChanges{}),
18: reflect.TypeOf(StartOperation{}), 18: reflect.TypeOf(StartOperation{}),
19: reflect.TypeOf(StopOperation{}), 19: reflect.TypeOf(StopOperation{}),
......
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