Commit 4c9fb9a2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 61308d4a
......@@ -2957,21 +2957,21 @@ overflow:
return 0, ErrDecodeOverflow
}
// 74. ClusterInformation
// 74. NotifyClusterState
func (_ *ClusterInformation) NEOMsgCode() uint16 {
func (_ *NotifyClusterState) NEOMsgCode() uint16 {
return 74
}
func (p *ClusterInformation) NEOMsgEncodedLen() int {
func (p *NotifyClusterState) NEOMsgEncodedLen() int {
return 4
}
func (p *ClusterInformation) NEOMsgEncode(data []byte) {
func (p *NotifyClusterState) NEOMsgEncode(data []byte) {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State)))
}
func (p *ClusterInformation) NEOMsgDecode(data []byte) (int, error) {
func (p *NotifyClusterState) NEOMsgDecode(data []byte) (int, error) {
if uint32(len(data)) < 4 {
goto overflow
}
......@@ -3660,7 +3660,7 @@ var msgTypeRegistry = map[uint16]reflect.Type{
71: reflect.TypeOf(repairFlags{}),
72: reflect.TypeOf(Repair{}),
73: reflect.TypeOf(RepairOne{}),
74: reflect.TypeOf(ClusterInformation{}),
74: reflect.TypeOf(NotifyClusterState{}),
75: reflect.TypeOf(AskClusterState{}),
76: reflect.TypeOf(AnswerClusterState{}),
77: reflect.TypeOf(ObjectUndoSerial{}),
......
......@@ -683,6 +683,7 @@ type TweakPartitionTable struct {
// Notify information about one or more nodes. PM -> Any.
type NotifyNodeInformation struct {
// XXX in py this is monotonic_time() of call to broadcastNodesInformation() & friends
IdTimestamp float64
NodeList []NodeInfo
}
......@@ -718,8 +719,9 @@ type RepairOne struct {
repairFlags
}
// Notify information about the cluster
type ClusterInformation struct {
// Notify information about the cluster state
// XXX = NotifyClusterInformation in py
type NotifyClusterState struct {
State ClusterState
}
......
......@@ -737,7 +737,7 @@ class PartitionTable(Packet):
PFRowList,
)
# XXX dup wrt PartitionChanges ?
# XXX dup wrt PartitionChanges ? -> no: here it is "send all rows" of PT
class NotifyPartitionTable(Packet):
"""
Send rows in a partition table to update other nodes. PM -> S, C.
......@@ -747,7 +747,7 @@ class NotifyPartitionTable(Packet):
PFRowList,
)
# XXX dup wrt NotifyPartitionTable ?
# XXX dup wrt NotifyPartitionTable ? -> no: here it s "send changes" of PT
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