Commit bdfc7f26 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b057ca72
......@@ -225,3 +225,29 @@ func (p *AnswerPartitionTable) NEODecode(data []byte) (int, error) {
}
return 0 /* + TODO variable part */, nil
}
func (p *NotifyPartitionTable) NEODecode(data []byte) (int, error) {
p.PTid = BigEndian.Uint64(data[0:])
{
l := BigEndian.Uint32(data[8:])
data = data[12:]
p.RowList = make([]neo.RowInfo, l)
for i := 0; i < l; i++ {
a := &p.RowList[i]
a.Offset = BigEndian.Uint32(data[0:])
{
l := BigEndian.Uint32(data[4:])
data = data[8:]
a.CellList = make([]neo.CellInfo, l)
for i := 0; i < l; i++ {
a := &a.CellList[i]
a.UUID = int32(BigEndian.Uint32(data[0:]))
a.CellState = int32(BigEndian.Uint32(data[4:]))
data = data[8:]
}
}
data = data[0:]
}
}
return 0 /* + TODO variable part */, nil
}
......@@ -280,13 +280,13 @@ type AnswerPartitionTable struct {
}
/*
// Send rows in a partition table to update other nodes. PM -> S, C.
type NotifyPartitionTable struct {
PTid
RowList []RowInfo
}
/*
// Notify a subset of a partition table. This is used to notify changes.
// PM -> S, C.
type PartitionChanges struct {
......
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