Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
ccf2bd2f
Commit
ccf2bd2f
authored
Jul 04, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6b6391c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
go/neo/proto/proto.go
go/neo/proto/proto.go
+22
-18
No files found.
go/neo/proto/proto.go
View file @
ccf2bd2f
...
@@ -96,7 +96,6 @@ const (
...
@@ -96,7 +96,6 @@ 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
)
)
...
@@ -299,7 +298,7 @@ type Checksum [20]byte
...
@@ -299,7 +298,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
{
...
@@ -329,14 +328,15 @@ func (t *IdTime) neoDecode(data []byte) (uint64, bool) {
...
@@ -329,14 +328,15 @@ 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
//
FIXME
clarify semantic where it is used
IdTime
IdTime
//
XXX
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
{
//
XXX
in py this is monotonic_time() of call to broadcastNodesInformation() & friends
//
NOTE
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
//
XXX _
answer = Error
// answer = Error
}
}
// Finish a transaction. C -> PM.
// Finish a transaction. C -> PM.
...
@@ -559,7 +559,6 @@ type AnswerInformationLocked struct {
...
@@ -559,7 +559,6 @@ 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
...
@@ -601,6 +600,11 @@ type AnswerRebaseTransaction struct {
...
@@ -601,6 +600,11 @@ 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
...
@@ -684,8 +688,8 @@ type AnswerObject struct {
...
@@ -684,8 +688,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
XXX this is TID actually ? -> no it is offset in list
First
uint64
// PIndex
[first, last) are offsets that define
Last
uint64
// PIndex
----//----
Last
uint64
// PIndex
range in tid list on remote.
Partition
uint32
// PNumber
Partition
uint32
// PNumber
}
}
...
@@ -713,8 +717,8 @@ type AnswerTransactionInformation struct {
...
@@ -713,8 +717,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
XXX this is actually TID
First
uint64
// PIndex
Last
uint64
// PIndex
----//----
Last
uint64
// PIndex
}
}
type
AnswerObjectHistory
struct
{
type
AnswerObjectHistory
struct
{
...
@@ -756,28 +760,28 @@ type SetNodeState struct {
...
@@ -756,28 +760,28 @@ type SetNodeState struct {
NodeUUID
NodeUUID
NodeState
NodeState
//
XXX _
answer = Error
// 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
//
XXX _
answer = Error
// 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
//
XXX _
answer = Error
// answer = Error
}
}
// Set the cluster state
// Set the cluster state
type
SetClusterState
struct
{
type
SetClusterState
struct
{
State
ClusterState
State
ClusterState
//
XXX _
answer = Error
// answer = Error
}
}
//neo:proto typeonly
//neo:proto typeonly
...
@@ -785,7 +789,7 @@ type repairFlags struct {
...
@@ -785,7 +789,7 @@ type repairFlags struct {
DryRun
bool
DryRun
bool
// pruneOrphan bool
// pruneOrphan bool
//
XXX _
answer = Error
// answer = Error
}
}
// Ask storage nodes to repair their databases. ctl -> A -> M
// Ask storage nodes to repair their databases. ctl -> A -> M
...
@@ -880,7 +884,7 @@ type CheckReplicas struct {
...
@@ -880,7 +884,7 @@ type CheckReplicas struct {
MinTID
zodb
.
Tid
MinTID
zodb
.
Tid
MaxTID
zodb
.
Tid
MaxTID
zodb
.
Tid
//
XXX _
answer = Error
// answer = Error
}
}
// M -> S
// M -> S
...
@@ -1073,7 +1077,7 @@ type AddObject struct {
...
@@ -1073,7 +1077,7 @@ type AddObject struct {
type
Truncate
struct
{
type
Truncate
struct
{
Tid
zodb
.
Tid
Tid
zodb
.
Tid
//
XXX _
answer = Error
// answer = Error
}
}
// ---- runtime support for protogen and custom codecs ----
// ---- runtime support for protogen and custom codecs ----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment