Commit a6f6207b authored by Kirill Smelkov's avatar Kirill Smelkov

.

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