Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
8c664816
Commit
8c664816
authored
Feb 01, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protocol: classify packets
parent
9f0f2afe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
neo/lib/protocol.py
neo/lib/protocol.py
+64
-0
No files found.
neo/lib/protocol.py
View file @
8c664816
...
@@ -660,6 +660,7 @@ class Ping(Packet):
...
@@ -660,6 +660,7 @@ class Ping(Packet):
"""
"""
Empty request used as network barrier.
Empty request used as network barrier.
:scope: connection
:nodes: * -> *
:nodes: * -> *
"""
"""
_answer
=
PFEmpty
_answer
=
PFEmpty
...
@@ -668,6 +669,7 @@ class CloseClient(Packet):
...
@@ -668,6 +669,7 @@ class CloseClient(Packet):
"""
"""
Tell peer that it can close the connection if it has finished with us.
Tell peer that it can close the connection if it has finished with us.
:scope: connection
:nodes: * -> *
:nodes: * -> *
"""
"""
...
@@ -676,6 +678,7 @@ class RequestIdentification(Packet):
...
@@ -676,6 +678,7 @@ class RequestIdentification(Packet):
Request a node identification. This must be the first packet for any
Request a node identification. This must be the first packet for any
connection.
connection.
:scope: identification
:nodes: * -> *
:nodes: * -> *
"""
"""
poll_thread
=
True
poll_thread
=
True
...
@@ -700,6 +703,7 @@ class PrimaryMaster(Packet):
...
@@ -700,6 +703,7 @@ class PrimaryMaster(Packet):
"""
"""
Ask node identier of the current primary master.
Ask node identier of the current primary master.
:scope: administration
:nodes: ctl -> A
:nodes: ctl -> A
"""
"""
_answer
=
PStruct
(
'answer_primary'
,
_answer
=
PStruct
(
'answer_primary'
,
...
@@ -711,6 +715,7 @@ class NotPrimaryMaster(Packet):
...
@@ -711,6 +715,7 @@ class NotPrimaryMaster(Packet):
Notify peer that I'm not the primary master. Attach any extra information
Notify peer that I'm not the primary master. Attach any extra information
to help the peer joining the cluster.
to help the peer joining the cluster.
:scope: election, identification
:nodes: SM -> *
:nodes: SM -> *
"""
"""
_fmt
=
PStruct
(
'not_primary_master'
,
_fmt
=
PStruct
(
'not_primary_master'
,
...
@@ -725,6 +730,7 @@ class Recovery(Packet):
...
@@ -725,6 +730,7 @@ class Recovery(Packet):
Ask storage nodes data needed by master to recover.
Ask storage nodes data needed by master to recover.
Reused by `neoctl print ids`.
Reused by `neoctl print ids`.
:scope: recovery, administration
:nodes: M -> S; ctl -> A -> M
:nodes: M -> S; ctl -> A -> M
"""
"""
_answer
=
PStruct
(
'answer_recovery'
,
_answer
=
PStruct
(
'answer_recovery'
,
...
@@ -738,6 +744,7 @@ class LastIDs(Packet):
...
@@ -738,6 +744,7 @@ class LastIDs(Packet):
Ask the last OID/TID so that a master can initialize its TransactionManager.
Ask the last OID/TID so that a master can initialize its TransactionManager.
Reused by `neoctl print ids`.
Reused by `neoctl print ids`.
:scope: verification, administration
:nodes: M -> S; ctl -> A -> M
:nodes: M -> S; ctl -> A -> M
"""
"""
_answer
=
PStruct
(
'answer_last_ids'
,
_answer
=
PStruct
(
'answer_last_ids'
,
...
@@ -750,6 +757,7 @@ class PartitionTable(Packet):
...
@@ -750,6 +757,7 @@ class PartitionTable(Packet):
Ask storage node the remaining data needed by master to recover.
Ask storage node the remaining data needed by master to recover.
This is also how the clients get the full partition table on connection.
This is also how the clients get the full partition table on connection.
:scope: recovery, partitioning
:nodes: M -> S; C -> M
:nodes: M -> S; C -> M
"""
"""
_answer
=
PStruct
(
'answer_partition_table'
,
_answer
=
PStruct
(
'answer_partition_table'
,
...
@@ -761,6 +769,7 @@ class NotifyPartitionTable(Packet):
...
@@ -761,6 +769,7 @@ class NotifyPartitionTable(Packet):
"""
"""
Send the full partition table to admin/storage nodes on connection.
Send the full partition table to admin/storage nodes on connection.
:scope: partitioning
:nodes: M -> A, S
:nodes: M -> A, S
"""
"""
_fmt
=
PStruct
(
'send_partition_table'
,
_fmt
=
PStruct
(
'send_partition_table'
,
...
@@ -772,6 +781,7 @@ class PartitionChanges(Packet):
...
@@ -772,6 +781,7 @@ class PartitionChanges(Packet):
"""
"""
Notify about changes in the partition table.
Notify about changes in the partition table.
:scope: partitioning
:nodes: M -> *
:nodes: M -> *
"""
"""
_fmt
=
PStruct
(
'notify_partition_changes'
,
_fmt
=
PStruct
(
'notify_partition_changes'
,
...
@@ -790,6 +800,7 @@ class StartOperation(Packet):
...
@@ -790,6 +800,7 @@ class StartOperation(Packet):
Tell a storage node to start operation. Before this message, it must only
Tell a storage node to start operation. Before this message, it must only
communicate with the primary master.
communicate with the primary master.
:scope: operation
:nodes: M -> S
:nodes: M -> S
"""
"""
_fmt
=
PStruct
(
'start_operation'
,
_fmt
=
PStruct
(
'start_operation'
,
...
@@ -803,6 +814,7 @@ class StopOperation(Packet):
...
@@ -803,6 +814,7 @@ class StopOperation(Packet):
Notify that the cluster is not operational anymore. Any operation between
Notify that the cluster is not operational anymore. Any operation between
nodes must be aborted.
nodes must be aborted.
:scope: operation
:nodes: M -> S, C
:nodes: M -> S, C
"""
"""
...
@@ -810,6 +822,7 @@ class UnfinishedTransactions(Packet):
...
@@ -810,6 +822,7 @@ class UnfinishedTransactions(Packet):
"""
"""
Ask unfinished transactions, which will be replicated when they're finished.
Ask unfinished transactions, which will be replicated when they're finished.
:scope: replication
:nodes: S -> M
:nodes: S -> M
"""
"""
_fmt
=
PStruct
(
'ask_unfinished_transactions'
,
_fmt
=
PStruct
(
'ask_unfinished_transactions'
,
...
@@ -830,6 +843,7 @@ class LockedTransactions(Packet):
...
@@ -830,6 +843,7 @@ class LockedTransactions(Packet):
Ask locked transactions to replay committed transactions that haven't been
Ask locked transactions to replay committed transactions that haven't been
unlocked.
unlocked.
:scope: verification
:nodes: M -> S
:nodes: M -> S
"""
"""
_answer
=
PStruct
(
'answer_locked_transactions'
,
_answer
=
PStruct
(
'answer_locked_transactions'
,
...
@@ -844,6 +858,7 @@ class FinalTID(Packet):
...
@@ -844,6 +858,7 @@ class FinalTID(Packet):
Return final tid if ttid has been committed, to recover from certain
Return final tid if ttid has been committed, to recover from certain
failures during tpc_finish.
failures during tpc_finish.
:scope: commit
:nodes: M -> S; C -> M, S
:nodes: M -> S; C -> M, S
"""
"""
_fmt
=
PStruct
(
'final_tid'
,
_fmt
=
PStruct
(
'final_tid'
,
...
@@ -858,6 +873,7 @@ class ValidateTransaction(Packet):
...
@@ -858,6 +873,7 @@ class ValidateTransaction(Packet):
"""
"""
Do replay a committed transaction that was not unlocked.
Do replay a committed transaction that was not unlocked.
:scope: verification
:nodes: M -> S
:nodes: M -> S
"""
"""
_fmt
=
PStruct
(
'validate_transaction'
,
_fmt
=
PStruct
(
'validate_transaction'
,
...
@@ -869,6 +885,7 @@ class BeginTransaction(Packet):
...
@@ -869,6 +885,7 @@ class BeginTransaction(Packet):
"""
"""
Ask to begin a new transaction. This maps to `tpc_begin`.
Ask to begin a new transaction. This maps to `tpc_begin`.
:scope: commit
:nodes: C -> M
:nodes: C -> M
"""
"""
_fmt
=
PStruct
(
'ask_begin_transaction'
,
_fmt
=
PStruct
(
'ask_begin_transaction'
,
...
@@ -884,6 +901,7 @@ class FailedVote(Packet):
...
@@ -884,6 +901,7 @@ class FailedVote(Packet):
Report storage nodes for which vote failed.
Report storage nodes for which vote failed.
True is returned if it's still possible to finish the transaction.
True is returned if it's still possible to finish the transaction.
:scope: commit
:nodes: C -> M
:nodes: C -> M
"""
"""
_fmt
=
PStruct
(
'failed_vote'
,
_fmt
=
PStruct
(
'failed_vote'
,
...
@@ -898,6 +916,7 @@ class FinishTransaction(Packet):
...
@@ -898,6 +916,7 @@ class FinishTransaction(Packet):
Finish a transaction. Return the TID of the committed transaction.
Finish a transaction. Return the TID of the committed transaction.
This maps to `tpc_finish`.
This maps to `tpc_finish`.
:scope: commit
:nodes: C -> M
:nodes: C -> M
"""
"""
poll_thread
=
True
poll_thread
=
True
...
@@ -919,6 +938,7 @@ class NotifyTransactionFinished(Packet):
...
@@ -919,6 +938,7 @@ class NotifyTransactionFinished(Packet):
"""
"""
Notify that a transaction blocking a replication is now finished.
Notify that a transaction blocking a replication is now finished.
:scope: replication
:nodes: M -> S
:nodes: M -> S
"""
"""
_fmt
=
PStruct
(
'notify_transaction_finished'
,
_fmt
=
PStruct
(
'notify_transaction_finished'
,
...
@@ -930,6 +950,7 @@ class LockInformation(Packet):
...
@@ -930,6 +950,7 @@ class LockInformation(Packet):
"""
"""
Commit a transaction. The new data is read-locked.
Commit a transaction. The new data is read-locked.
:scope: commit
:nodes: M -> S
:nodes: M -> S
"""
"""
_fmt
=
PStruct
(
'ask_lock_informations'
,
_fmt
=
PStruct
(
'ask_lock_informations'
,
...
@@ -946,6 +967,7 @@ class InvalidateObjects(Packet):
...
@@ -946,6 +967,7 @@ class InvalidateObjects(Packet):
Notify about a new transaction modifying objects,
Notify about a new transaction modifying objects,
invalidating client caches.
invalidating client caches.
:scope: commit
:nodes: M -> C
:nodes: M -> C
"""
"""
_fmt
=
PStruct
(
'ask_finish_transaction'
,
_fmt
=
PStruct
(
'ask_finish_transaction'
,
...
@@ -958,6 +980,7 @@ class UnlockInformation(Packet):
...
@@ -958,6 +980,7 @@ class UnlockInformation(Packet):
Notify about a successfully committed transaction. The new data can be
Notify about a successfully committed transaction. The new data can be
unlocked.
unlocked.
:scope: commit
:nodes: M -> S
:nodes: M -> S
"""
"""
_fmt
=
PStruct
(
'notify_unlock_information'
,
_fmt
=
PStruct
(
'notify_unlock_information'
,
...
@@ -968,6 +991,7 @@ class GenerateOIDs(Packet):
...
@@ -968,6 +991,7 @@ class GenerateOIDs(Packet):
"""
"""
Ask new OIDs to create objects.
Ask new OIDs to create objects.
:scope: commit
:nodes: C -> M
:nodes: C -> M
"""
"""
_fmt
=
PStruct
(
'ask_new_oids'
,
_fmt
=
PStruct
(
'ask_new_oids'
,
...
@@ -983,6 +1007,7 @@ class Deadlock(Packet):
...
@@ -983,6 +1007,7 @@ class Deadlock(Packet):
Ask master to generate a new TTID that will be used by the client to solve
Ask master to generate a new TTID that will be used by the client to solve
a deadlock by rebasing the transaction on top of concurrent changes.
a deadlock by rebasing the transaction on top of concurrent changes.
:scope: commit
:nodes: S -> M -> C
:nodes: S -> M -> C
"""
"""
_fmt
=
PStruct
(
'notify_deadlock'
,
_fmt
=
PStruct
(
'notify_deadlock'
,
...
@@ -994,6 +1019,7 @@ class RebaseTransaction(Packet):
...
@@ -994,6 +1019,7 @@ class RebaseTransaction(Packet):
"""
"""
Rebase a transaction to solve a deadlock.
Rebase a transaction to solve a deadlock.
:scope: commit
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_rebase_transaction'
,
_fmt
=
PStruct
(
'ask_rebase_transaction'
,
...
@@ -1009,6 +1035,7 @@ class RebaseObject(Packet):
...
@@ -1009,6 +1035,7 @@ class RebaseObject(Packet):
"""
"""
Rebase an object change to solve a deadlock.
Rebase an object change to solve a deadlock.
:scope: commit
:nodes: C -> S
:nodes: C -> S
XXX: It is a request packet to simplify the implementation. For more
XXX: It is a request packet to simplify the implementation. For more
...
@@ -1039,6 +1066,7 @@ class StoreObject(Packet):
...
@@ -1039,6 +1066,7 @@ class StoreObject(Packet):
As for IStorage, 'serial' is ZERO_TID for new objects.
As for IStorage, 'serial' is ZERO_TID for new objects.
:scope: commit
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_store_object'
,
_fmt
=
PStruct
(
'ask_store_object'
,
...
@@ -1059,6 +1087,7 @@ class AbortTransaction(Packet):
...
@@ -1059,6 +1087,7 @@ class AbortTransaction(Packet):
"""
"""
Abort a transaction. This maps to `tpc_abort`.
Abort a transaction. This maps to `tpc_abort`.
:scope: commit
:nodes: C -> S; C -> M -> S
:nodes: C -> S; C -> M -> S
"""
"""
_fmt
=
PStruct
(
'abort_transaction'
,
_fmt
=
PStruct
(
'abort_transaction'
,
...
@@ -1070,6 +1099,7 @@ class StoreTransaction(Packet):
...
@@ -1070,6 +1099,7 @@ class StoreTransaction(Packet):
"""
"""
Ask to store a transaction. Implies vote.
Ask to store a transaction. Implies vote.
:scope: commit
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_store_transaction'
,
_fmt
=
PStruct
(
'ask_store_transaction'
,
...
@@ -1085,6 +1115,7 @@ class VoteTransaction(Packet):
...
@@ -1085,6 +1115,7 @@ class VoteTransaction(Packet):
"""
"""
Ask to vote a transaction.
Ask to vote a transaction.
:scope: commit
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_vote_transaction'
,
_fmt
=
PStruct
(
'ask_vote_transaction'
,
...
@@ -1097,6 +1128,7 @@ class GetObject(Packet):
...
@@ -1097,6 +1128,7 @@ class GetObject(Packet):
Ask a stored object by its OID, optionally at/before a specific tid.
Ask a stored object by its OID, optionally at/before a specific tid.
This maps to `load/loadBefore/loadSerial`.
This maps to `load/loadBefore/loadSerial`.
:scope: read
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_object'
,
_fmt
=
PStruct
(
'ask_object'
,
...
@@ -1120,6 +1152,7 @@ class TIDList(Packet):
...
@@ -1120,6 +1152,7 @@ class TIDList(Packet):
Ask for TIDs between a range of offsets. The order of TIDs is descending,
Ask for TIDs between a range of offsets. The order of TIDs is descending,
and the range is [first, last). This maps to `undoLog`.
and the range is [first, last). This maps to `undoLog`.
:scope: read
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_tids'
,
_fmt
=
PStruct
(
'ask_tids'
,
...
@@ -1137,6 +1170,7 @@ class TIDListFrom(Packet):
...
@@ -1137,6 +1170,7 @@ class TIDListFrom(Packet):
Ask for length TIDs starting at min_tid. The order of TIDs is ascending.
Ask for length TIDs starting at min_tid. The order of TIDs is ascending.
Used by `iterator`.
Used by `iterator`.
:scope: read
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'tid_list_from'
,
_fmt
=
PStruct
(
'tid_list_from'
,
...
@@ -1154,6 +1188,7 @@ class TransactionInformation(Packet):
...
@@ -1154,6 +1188,7 @@ class TransactionInformation(Packet):
"""
"""
Ask for transaction metadata.
Ask for transaction metadata.
:scope: read
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_transaction_information'
,
_fmt
=
PStruct
(
'ask_transaction_information'
,
...
@@ -1174,6 +1209,7 @@ class ObjectHistory(Packet):
...
@@ -1174,6 +1209,7 @@ class ObjectHistory(Packet):
Ask history information for a given object. The order of serials is
Ask history information for a given object. The order of serials is
descending, and the range is [first, last]. This maps to `history`.
descending, and the range is [first, last]. This maps to `history`.
:scope: read
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_object_history'
,
_fmt
=
PStruct
(
'ask_object_history'
,
...
@@ -1191,6 +1227,7 @@ class PartitionList(Packet):
...
@@ -1191,6 +1227,7 @@ class PartitionList(Packet):
"""
"""
Ask information about partitions.
Ask information about partitions.
:scope: administration
:nodes: ctl -> A
:nodes: ctl -> A
"""
"""
_fmt
=
PStruct
(
'ask_partition_list'
,
_fmt
=
PStruct
(
'ask_partition_list'
,
...
@@ -1208,6 +1245,7 @@ class NodeList(Packet):
...
@@ -1208,6 +1245,7 @@ class NodeList(Packet):
"""
"""
Ask information about nodes.
Ask information about nodes.
:scope: administration
:nodes: ctl -> A
:nodes: ctl -> A
"""
"""
_fmt
=
PStruct
(
'ask_node_list'
,
_fmt
=
PStruct
(
'ask_node_list'
,
...
@@ -1222,6 +1260,7 @@ class SetNodeState(Packet):
...
@@ -1222,6 +1260,7 @@ class SetNodeState(Packet):
"""
"""
Change the state of a node.
Change the state of a node.
:scope: operation
:nodes: ctl -> A -> M
:nodes: ctl -> A -> M
"""
"""
_fmt
=
PStruct
(
'set_node_state'
,
_fmt
=
PStruct
(
'set_node_state'
,
...
@@ -1236,6 +1275,7 @@ class AddPendingNodes(Packet):
...
@@ -1236,6 +1275,7 @@ class AddPendingNodes(Packet):
Mark given pending nodes as running, for future inclusion when tweaking
Mark given pending nodes as running, for future inclusion when tweaking
the partition table.
the partition table.
:scope: partitioning
:nodes: ctl -> A -> M
:nodes: ctl -> A -> M
"""
"""
_fmt
=
PStruct
(
'add_pending_nodes'
,
_fmt
=
PStruct
(
'add_pending_nodes'
,
...
@@ -1249,6 +1289,7 @@ class TweakPartitionTable(Packet):
...
@@ -1249,6 +1289,7 @@ class TweakPartitionTable(Packet):
Ask the master to balance the partition table, optionally excluding
Ask the master to balance the partition table, optionally excluding
specific nodes in anticipation of removing them.
specific nodes in anticipation of removing them.
:scope: partitioning
:nodes: ctl -> A -> M
:nodes: ctl -> A -> M
"""
"""
_fmt
=
PStruct
(
'tweak_partition_table'
,
_fmt
=
PStruct
(
'tweak_partition_table'
,
...
@@ -1261,6 +1302,7 @@ class NotifyNodeInformation(Packet):
...
@@ -1261,6 +1302,7 @@ class NotifyNodeInformation(Packet):
"""
"""
Notify information about one or more nodes.
Notify information about one or more nodes.
:scope: operation
:nodes: M -> *
:nodes: M -> *
"""
"""
_fmt
=
PStruct
(
'notify_node_informations'
,
_fmt
=
PStruct
(
'notify_node_informations'
,
...
@@ -1272,6 +1314,7 @@ class SetClusterState(Packet):
...
@@ -1272,6 +1314,7 @@ class SetClusterState(Packet):
"""
"""
Set the cluster state.
Set the cluster state.
:scope: operation
:nodes: ctl -> A -> M
:nodes: ctl -> A -> M
"""
"""
_fmt
=
PStruct
(
'set_cluster_state'
,
_fmt
=
PStruct
(
'set_cluster_state'
,
...
@@ -1284,6 +1327,7 @@ class Repair(Packet):
...
@@ -1284,6 +1327,7 @@ class Repair(Packet):
"""
"""
Ask storage nodes to repair their databases.
Ask storage nodes to repair their databases.
:scope: maintenance
:nodes: ctl -> A -> M
:nodes: ctl -> A -> M
"""
"""
_flags
=
map
(
PBoolean
,
(
'dry_run'
,
_flags
=
map
(
PBoolean
,
(
'dry_run'
,
...
@@ -1300,6 +1344,7 @@ class RepairOne(Packet):
...
@@ -1300,6 +1344,7 @@ class RepairOne(Packet):
Repair is translated to this message, asking a specific storage node to
Repair is translated to this message, asking a specific storage node to
repair its database.
repair its database.
:scope: maintenance
:nodes: M -> S
:nodes: M -> S
"""
"""
_fmt
=
PStruct
(
'repair'
,
*
Repair
.
_flags
)
_fmt
=
PStruct
(
'repair'
,
*
Repair
.
_flags
)
...
@@ -1308,6 +1353,7 @@ class ClusterInformation(Packet):
...
@@ -1308,6 +1353,7 @@ class ClusterInformation(Packet):
"""
"""
Notify about a cluster state change.
Notify about a cluster state change.
:scope: operation
:nodes: M -> *
:nodes: M -> *
"""
"""
_fmt
=
PStruct
(
'notify_cluster_information'
,
_fmt
=
PStruct
(
'notify_cluster_information'
,
...
@@ -1318,6 +1364,7 @@ class ClusterState(Packet):
...
@@ -1318,6 +1364,7 @@ class ClusterState(Packet):
"""
"""
Ask the state of the cluster
Ask the state of the cluster
:scope: administration
:nodes: ctl -> A; A -> M
:nodes: ctl -> A; A -> M
"""
"""
...
@@ -1340,6 +1387,7 @@ class ObjectUndoSerial(Packet):
...
@@ -1340,6 +1387,7 @@ class ObjectUndoSerial(Packet):
is_current (bool)
is_current (bool)
If current_serial's data is current on storage.
If current_serial's data is current on storage.
:scope: read
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_undo_transaction'
,
_fmt
=
PStruct
(
'ask_undo_transaction'
,
...
@@ -1366,6 +1414,7 @@ class CheckCurrentSerial(Packet):
...
@@ -1366,6 +1414,7 @@ class CheckCurrentSerial(Packet):
this state is not altered until transaction ends.
this state is not altered until transaction ends.
This maps to `checkCurrentSerialInTransaction`.
This maps to `checkCurrentSerialInTransaction`.
:scope: commit
:nodes: C -> S
:nodes: C -> S
"""
"""
_fmt
=
PStruct
(
'ask_check_current_serial'
,
_fmt
=
PStruct
(
'ask_check_current_serial'
,
...
@@ -1380,6 +1429,7 @@ class Pack(Packet):
...
@@ -1380,6 +1429,7 @@ class Pack(Packet):
"""
"""
Request a pack at given TID.
Request a pack at given TID.
:scope: maintenance
:nodes: C -> M -> S
:nodes: C -> M -> S
"""
"""
_fmt
=
PStruct
(
'ask_pack'
,
_fmt
=
PStruct
(
'ask_pack'
,
...
@@ -1395,6 +1445,7 @@ class CheckReplicas(Packet):
...
@@ -1395,6 +1445,7 @@ class CheckReplicas(Packet):
Ask the cluster to search for mismatches between replicas, metadata only,
Ask the cluster to search for mismatches between replicas, metadata only,
and optionally within a specific range. Reference nodes can be specified.
and optionally within a specific range. Reference nodes can be specified.
:scope: maintenance
:nodes: ctl -> A -> M
:nodes: ctl -> A -> M
"""
"""
_fmt
=
PStruct
(
'check_replicas'
,
_fmt
=
PStruct
(
'check_replicas'
,
...
@@ -1413,6 +1464,7 @@ class CheckPartition(Packet):
...
@@ -1413,6 +1464,7 @@ class CheckPartition(Packet):
Like for CheckReplicas, only metadata are checked, optionally within a
Like for CheckReplicas, only metadata are checked, optionally within a
specific range. A reference node can be specified.
specific range. A reference node can be specified.
:scope: maintenance
:nodes: M -> S
:nodes: M -> S
"""
"""
_fmt
=
PStruct
(
'check_partition'
,
_fmt
=
PStruct
(
'check_partition'
,
...
@@ -1431,6 +1483,7 @@ class CheckTIDRange(Packet):
...
@@ -1431,6 +1483,7 @@ class CheckTIDRange(Packet):
Used to know if there are differences between a replicating node and
Used to know if there are differences between a replicating node and
reference node.
reference node.
:scope: maintenance
:nodes: S -> S
:nodes: S -> S
"""
"""
_fmt
=
PStruct
(
'ask_check_tid_range'
,
_fmt
=
PStruct
(
'ask_check_tid_range'
,
...
@@ -1452,6 +1505,7 @@ class CheckSerialRange(Packet):
...
@@ -1452,6 +1505,7 @@ class CheckSerialRange(Packet):
Used to know if there are differences between a replicating node and
Used to know if there are differences between a replicating node and
reference node.
reference node.
:scope: maintenance
:nodes: S -> S
:nodes: S -> S
"""
"""
_fmt
=
PStruct
(
'ask_check_serial_range'
,
_fmt
=
PStruct
(
'ask_check_serial_range'
,
...
@@ -1474,6 +1528,7 @@ class PartitionCorrupted(Packet):
...
@@ -1474,6 +1528,7 @@ class PartitionCorrupted(Packet):
"""
"""
Notify that mismatches were found while check replicas for a partition.
Notify that mismatches were found while check replicas for a partition.
:scope: maintenance
:nodes: S -> M
:nodes: S -> M
"""
"""
_fmt
=
PStruct
(
'partition_corrupted'
,
_fmt
=
PStruct
(
'partition_corrupted'
,
...
@@ -1487,6 +1542,7 @@ class LastTransaction(Packet):
...
@@ -1487,6 +1542,7 @@ class LastTransaction(Packet):
"""
"""
Ask last committed TID.
Ask last committed TID.
:scope: read, administration
:nodes: C -> M; ctl -> A -> M
:nodes: C -> M; ctl -> A -> M
"""
"""
poll_thread
=
True
poll_thread
=
True
...
@@ -1499,6 +1555,7 @@ class NotifyReady(Packet):
...
@@ -1499,6 +1555,7 @@ class NotifyReady(Packet):
"""
"""
Notify that we're ready to serve requests.
Notify that we're ready to serve requests.
:scope: operation
:nodes: S -> M
:nodes: S -> M
"""
"""
...
@@ -1507,6 +1564,7 @@ class FetchTransactions(Packet):
...
@@ -1507,6 +1564,7 @@ class FetchTransactions(Packet):
Ask a storage node to send all transaction data we don't have,
Ask a storage node to send all transaction data we don't have,
and reply with the list of transactions we should not have.
and reply with the list of transactions we should not have.
:scope: replication
:nodes: S -> S
:nodes: S -> S
"""
"""
_fmt
=
PStruct
(
'ask_transaction_list'
,
_fmt
=
PStruct
(
'ask_transaction_list'
,
...
@@ -1526,6 +1584,7 @@ class AddTransaction(Packet):
...
@@ -1526,6 +1584,7 @@ class AddTransaction(Packet):
"""
"""
Send metadata of a transaction to a node that do not have them.
Send metadata of a transaction to a node that do not have them.
:scope: replication
:nodes: S -> S
:nodes: S -> S
"""
"""
nodelay
=
False
nodelay
=
False
...
@@ -1545,6 +1604,7 @@ class FetchObjects(Packet):
...
@@ -1545,6 +1604,7 @@ class FetchObjects(Packet):
Ask a storage node to send object records we don't have,
Ask a storage node to send object records we don't have,
and reply with the list of records we should not have.
and reply with the list of records we should not have.
:scope: replication
:nodes: S -> S
:nodes: S -> S
"""
"""
_fmt
=
PStruct
(
'ask_object_list'
,
_fmt
=
PStruct
(
'ask_object_list'
,
...
@@ -1572,6 +1632,7 @@ class AddObject(Packet):
...
@@ -1572,6 +1632,7 @@ class AddObject(Packet):
"""
"""
Send an object record to a node that do not have it.
Send an object record to a node that do not have it.
:scope: replication
:nodes: S -> S
:nodes: S -> S
"""
"""
nodelay
=
False
nodelay
=
False
...
@@ -1594,6 +1655,7 @@ class Replicate(Packet):
...
@@ -1594,6 +1655,7 @@ class Replicate(Packet):
- address: address of the source storage node, or None if there's no new
- address: address of the source storage node, or None if there's no new
data up to 'tid' for the given partition
data up to 'tid' for the given partition
:scope: replication
:nodes: M -> S
:nodes: M -> S
"""
"""
_fmt
=
PStruct
(
'replicate'
,
_fmt
=
PStruct
(
'replicate'
,
...
@@ -1610,6 +1672,7 @@ class ReplicationDone(Packet):
...
@@ -1610,6 +1672,7 @@ class ReplicationDone(Packet):
Notify the master node that a partition has been successfully replicated
Notify the master node that a partition has been successfully replicated
from a storage to another.
from a storage to another.
:scope: replication
:nodes: S -> M
:nodes: S -> M
"""
"""
_fmt
=
PStruct
(
'notify_replication_done'
,
_fmt
=
PStruct
(
'notify_replication_done'
,
...
@@ -1621,6 +1684,7 @@ class Truncate(Packet):
...
@@ -1621,6 +1684,7 @@ class Truncate(Packet):
"""
"""
Request DB to be truncated. Also used to leave backup mode.
Request DB to be truncated. Also used to leave backup mode.
:scope: maintenance
:nodes: ctl -> A -> M; M -> S
:nodes: ctl -> A -> M; M -> S
"""
"""
_fmt
=
PStruct
(
'truncate'
,
_fmt
=
PStruct
(
'truncate'
,
...
...
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