Commit a6f6207b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ccf2bd2f
...@@ -96,6 +96,7 @@ const ( ...@@ -96,6 +96,7 @@ const (
//INVALID_UUID UUID = 0 //INVALID_UUID UUID = 0
// XXX -> zodb?
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
) )
...@@ -298,7 +299,7 @@ type Checksum [20]byte ...@@ -298,7 +299,7 @@ type Checksum [20]byte
// Zero value means "invalid id" (<-> None in py.PPTID) // Zero value means "invalid id" (<-> None in py.PPTID)
type PTid uint64 type PTid uint64
// IdTime represents time of identification. // IdTime represents time of identification
type IdTime float64 type IdTime float64
func (t IdTime) neoEncodedLen() int { func (t IdTime) neoEncodedLen() int {
...@@ -328,15 +329,14 @@ func (t *IdTime) neoDecode(data []byte) (uint64, bool) { ...@@ -328,15 +329,14 @@ func (t *IdTime) neoDecode(data []byte) (uint64, bool) {
return 8, true return 8, true
} }
// NodeInfo is information about a node. // NodeInfo is information about a node
//
//neo:proto typeonly //neo:proto typeonly
type NodeInfo struct { type NodeInfo struct {
Type NodeType Type NodeType
Addr Address // serving address Addr Address // serving address
UUID NodeUUID UUID NodeUUID
State NodeState State NodeState
IdTime IdTime // XXX clarify semantic where it is used IdTime IdTime // FIXME clarify semantic where it is used
} }
//neo:proto typeonly //neo:proto typeonly
...@@ -410,7 +410,7 @@ type NotPrimaryMaster struct { ...@@ -410,7 +410,7 @@ type NotPrimaryMaster struct {
// Notify information about one or more nodes. PM -> Any. // Notify information about one or more nodes. PM -> Any.
type NotifyNodeInformation struct { type NotifyNodeInformation struct {
// NOTE in py this is monotonic_time() of call to broadcastNodesInformation() & friends // XXX in py this is monotonic_time() of call to broadcastNodesInformation() & friends
IdTime IdTime IdTime IdTime
NodeList []NodeInfo NodeList []NodeInfo
} }
...@@ -531,7 +531,7 @@ type FailedVote struct { ...@@ -531,7 +531,7 @@ type FailedVote struct {
Tid zodb.Tid Tid zodb.Tid
NodeList []NodeUUID NodeList []NodeUUID
// answer = Error // XXX _answer = Error
} }
// Finish a transaction. C -> PM. // Finish a transaction. C -> PM.
...@@ -559,6 +559,7 @@ type AnswerInformationLocked struct { ...@@ -559,6 +559,7 @@ type AnswerInformationLocked struct {
} }
// Invalidate objects. PM -> C. // Invalidate objects. PM -> C.
// XXX ask_finish_transaction ?
type InvalidateObjects struct { type InvalidateObjects struct {
Tid zodb.Tid Tid zodb.Tid
OidList []zodb.Oid OidList []zodb.Oid
...@@ -600,11 +601,6 @@ type AnswerRebaseTransaction struct { ...@@ -600,11 +601,6 @@ type AnswerRebaseTransaction struct {
} }
// Rebase object. C -> S. // Rebase object. C -> S.
//
// XXX: It is a request packet to simplify the implementation. For more
// efficiency, this should be turned into a notification, and the
// RebaseTransaction should answered once all objects are rebased
// (so that the client can still wait on something).
type RebaseObject struct { type RebaseObject struct {
TTid zodb.Tid TTid zodb.Tid
Oid zodb.Oid Oid zodb.Oid
...@@ -688,8 +684,8 @@ type AnswerObject struct { ...@@ -688,8 +684,8 @@ type AnswerObject struct {
// and the range is [first, last). C -> S. // and the range is [first, last). C -> S.
// Answer the requested TIDs. S -> C. // Answer the requested TIDs. S -> C.
type AskTIDs struct { type AskTIDs struct {
First uint64 // PIndex [first, last) are offsets that define First uint64 // PIndex XXX this is TID actually ? -> no it is offset in list
Last uint64 // PIndex range in tid list on remote. Last uint64 // PIndex ----//----
Partition uint32 // PNumber Partition uint32 // PNumber
} }
...@@ -717,8 +713,8 @@ type AnswerTransactionInformation struct { ...@@ -717,8 +713,8 @@ type AnswerTransactionInformation struct {
// Answer history information (serial, size) for an object. S -> C. // Answer history information (serial, size) for an object. S -> C.
type ObjectHistory struct { type ObjectHistory struct {
Oid zodb.Oid Oid zodb.Oid
First uint64 // PIndex First uint64 // PIndex XXX this is actually TID
Last uint64 // PIndex Last uint64 // PIndex ----//----
} }
type AnswerObjectHistory struct { type AnswerObjectHistory struct {
...@@ -760,28 +756,28 @@ type SetNodeState struct { ...@@ -760,28 +756,28 @@ type SetNodeState struct {
NodeUUID NodeUUID
NodeState NodeState
// answer = Error // XXX _answer = Error
} }
// Ask the primary to include some pending node in the partition table // Ask the primary to include some pending node in the partition table
type AddPendingNodes struct { type AddPendingNodes struct {
NodeList []NodeUUID NodeList []NodeUUID
// answer = Error // XXX _answer = Error
} }
// Ask the primary to optimize the partition table. A -> PM. // Ask the primary to optimize the partition table. A -> PM.
type TweakPartitionTable struct { type TweakPartitionTable struct {
NodeList []NodeUUID NodeList []NodeUUID
// answer = Error // XXX _answer = Error
} }
// Set the cluster state // Set the cluster state
type SetClusterState struct { type SetClusterState struct {
State ClusterState State ClusterState
// answer = Error // XXX _answer = Error
} }
//neo:proto typeonly //neo:proto typeonly
...@@ -789,7 +785,7 @@ type repairFlags struct { ...@@ -789,7 +785,7 @@ type repairFlags struct {
DryRun bool DryRun bool
// pruneOrphan bool // pruneOrphan bool
// answer = Error // XXX _answer = Error
} }
// Ask storage nodes to repair their databases. ctl -> A -> M // Ask storage nodes to repair their databases. ctl -> A -> M
...@@ -884,7 +880,7 @@ type CheckReplicas struct { ...@@ -884,7 +880,7 @@ type CheckReplicas struct {
MinTID zodb.Tid MinTID zodb.Tid
MaxTID zodb.Tid MaxTID zodb.Tid
// answer = Error // XXX _answer = Error
} }
// M -> S // M -> S
...@@ -1077,7 +1073,7 @@ type AddObject struct { ...@@ -1077,7 +1073,7 @@ type AddObject struct {
type Truncate struct { type Truncate struct {
Tid zodb.Tid Tid zodb.Tid
// answer = Error // XXX _answer = Error
} }
// ---- runtime support for protogen and custom codecs ---- // ---- runtime support for protogen and custom codecs ----
......
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