MySQL 8.4.0
Source Code Documentation
Pipeline_stats_member_message Class Reference

Describes all statistics sent by members. More...

#include <pipeline_stats.h>

Inheritance diagram for Pipeline_stats_member_message:
[legend]

Public Types

enum  enum_payload_item_type {
  PIT_UNKNOWN = 0 , PIT_TRANSACTIONS_WAITING_CERTIFICATION = 1 , PIT_TRANSACTIONS_WAITING_APPLY = 2 , PIT_TRANSACTIONS_CERTIFIED = 3 ,
  PIT_TRANSACTIONS_APPLIED = 4 , PIT_TRANSACTIONS_LOCAL = 5 , PIT_TRANSACTIONS_NEGATIVE_CERTIFIED = 6 , PIT_TRANSACTIONS_ROWS_VALIDATING = 7 ,
  PIT_TRANSACTIONS_COMMITTED_ALL_MEMBERS = 8 , PIT_TRANSACTION_LAST_CONFLICT_FREE = 9 , PIT_TRANSACTIONS_LOCAL_ROLLBACK = 10 , PIT_FLOW_CONTROL_MODE = 11 ,
  PIT_TRANSACTION_GTIDS_PRESENT = 12 , PIT_SENT_TIMESTAMP = 13 , PIT_MAX = 14
}
 
- Public Types inherited from Plugin_gcs_message
enum  enum_cargo_type {
  CT_UNKNOWN = 0 , CT_CERTIFICATION_MESSAGE = 1 , CT_TRANSACTION_MESSAGE = 2 , CT_RECOVERY_MESSAGE = 3 ,
  CT_MEMBER_INFO_MESSAGE = 4 , CT_MEMBER_INFO_MANAGER_MESSAGE = 5 , CT_PIPELINE_STATS_MEMBER_MESSAGE = 6 , CT_SINGLE_PRIMARY_MESSAGE = 7 ,
  CT_GROUP_ACTION_MESSAGE = 8 , CT_GROUP_VALIDATION_MESSAGE = 9 , CT_SYNC_BEFORE_EXECUTION_MESSAGE = 10 , CT_TRANSACTION_WITH_GUARANTEE_MESSAGE = 11 ,
  CT_TRANSACTION_PREPARED_MESSAGE = 12 , CT_MESSAGE_SERVICE_MESSAGE = 13 , CT_RECOVERY_METADATA_MESSAGE = 14 , CT_MAX = 15
}
 The different cargo type codes. More...
 

Public Member Functions

 Pipeline_stats_member_message (int32 transactions_waiting_certification, int32 transactions_waiting_apply, int64 transactions_certified, int64 transactions_applied, int64 transactions_local, int64 transactions_negative_certified, int64 transactions_rows_validating, bool transaction_gtids, const std::string &transactions_committed_all_members, const std::string &transactions_last_conflict_free, int64 transactions_local_rollback, Flow_control_mode mode)
 Message constructor. More...
 
 Pipeline_stats_member_message (const unsigned char *buf, size_t len)
 Message constructor for raw data. More...
 
 ~Pipeline_stats_member_message () override
 Message destructor. More...
 
int32 get_transactions_waiting_certification ()
 Get transactions waiting certification counter value. More...
 
int32 get_transactions_waiting_apply ()
 Get transactions waiting apply counter value. More...
 
int64 get_transactions_certified ()
 Get transactions certified. More...
 
int64 get_transactions_applied ()
 Get transactions applied. More...
 
int64 get_transactions_local ()
 Get local transactions that member tried to commit. More...
 
int64 get_transactions_negative_certified ()
 Get negatively certified transaction by member. More...
 
int64 get_transactions_rows_validating ()
 Get size of conflict detection database. More...
 
bool get_transation_gtids_present () const
 Returns a flag indicating whether or not the GTIDs on this stats message are updated/present. More...
 
const std::string & get_transaction_committed_all_members ()
 Get set of stable group transactions. More...
 
const std::string & get_transaction_last_conflict_free ()
 Get last positive certified transaction. More...
 
int64 get_transactions_local_rollback ()
 Get local transactions rolled back by the member. More...
 
Flow_control_mode get_flow_control_mode ()
 Get flow-control mode of member. More...
 
- Public Member Functions inherited from Plugin_gcs_message
virtual ~Plugin_gcs_message ()=default
 
int get_version ()
 
unsigned short get_header_length ()
 
enum_cargo_type get_cargo_type () const
 
unsigned long long get_msg_length ()
 
void encode (std::vector< unsigned char > *buffer) const
 Encodes the contents of this instance into the buffer. More...
 
void decode (const unsigned char *buffer, size_t length)
 Decodes the contents of the buffer and sets the field values according to the values decoded. More...
 

Static Public Member Functions

static uint64_t get_sent_timestamp (const unsigned char *buffer, size_t length)
 Return the time at which the message contained in the buffer was sent. More...
 
- Static Public Member Functions inherited from Plugin_gcs_message
static enum_cargo_type get_cargo_type (const unsigned char *buffer)
 Return the cargo type of a given message buffer, without decode the complete message. More...
 
static void get_first_payload_item_raw_data (const unsigned char *buffer, const unsigned char **payload_item_data, size_t *payload_item_length)
 Return the raw data of the first payload item of a given message buffer, without decode the complete message. More...
 
static bool get_payload_item_type_raw_data (const unsigned char *buffer, const unsigned char *end, uint16 payload_item_type, const unsigned char **payload_item_data, unsigned long long *payload_item_length)
 Return the raw data of the payload item of a given payload type of a given message buffer. More...
 

Protected Member Functions

void encode_payload (std::vector< unsigned char > *buffer) const override
 Encodes the message contents for transmission. More...
 
void decode_payload (const unsigned char *buffer, const unsigned char *end) override
 Message decoding method. More...
 
- Protected Member Functions inherited from Plugin_gcs_message
 Plugin_gcs_message (enum_cargo_type cargo_type)
 Plugin_gcs_message constructor. More...
 
void encode_header (std::vector< unsigned char > *buffer) const
 Encodes the header of this instance into the buffer. More...
 
void decode_header (const unsigned char **slider)
 Decodes the header of the buffer into this instance. More...
 
void encode_payload_item_type_and_length (std::vector< unsigned char > *buffer, uint16 payload_item_type, unsigned long long payload_item_length) const
 Encodes the given payload item type and length into the buffer. More...
 
void encode_payload_item_char (std::vector< unsigned char > *buffer, uint16 type, unsigned char value) const
 Encodes the given payload item (type, length and value) into the buffer as a char (1 byte). More...
 
void encode_payload_item_int2 (std::vector< unsigned char > *buffer, uint16 type, uint16 value) const
 Encodes the given payload item (type, length and value) into the buffer as a 2 bytes integer. More...
 
void decode_payload_item_int2 (const unsigned char **buffer, uint16 *type, uint16 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 2 bytes integer. More...
 
void encode_payload_item_int4 (std::vector< unsigned char > *buffer, uint16 type, uint32 value) const
 Encodes the given payload item (type, length and value) into the buffer as a 4 bytes integer. More...
 
void decode_payload_item_int4 (const unsigned char **buffer, uint16 *type, uint32 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 4 bytes integer. More...
 
void encode_payload_item_int8 (std::vector< unsigned char > *buffer, uint16 type, ulonglong value) const
 Encodes the given payload item (type, length and value) into the buffer as a 8 bytes integer. More...
 
void encode_payload_item_string (std::vector< unsigned char > *buffer, uint16 type, const char *value, unsigned long long length) const
 Encodes the given payload item (type, length and value) into the buffer as a char array (variable size). More...
 
void decode_payload_item_string (const unsigned char **buffer, uint16 *type, std::string *value, unsigned long long *length)
 Decodes the given payload item (type, length and value) from the buffer as a char array (variable size). More...
 
void encode_payload_item_bytes (std::vector< unsigned char > *buffer, uint16 type, const unsigned char *value, unsigned long long length) const
 Encodes the given payload item (type, length and value) into the buffer as a byte buffer (variable size). More...
 
void decode_payload_item_bytes (const unsigned char **buffer, uint16 *type, unsigned char *value, unsigned long long *length)
 Decodes the given payload item (type, length and value) from the buffer as a byte buffer (variable size). More...
 

Private Attributes

int32 m_transactions_waiting_certification
 
int32 m_transactions_waiting_apply
 
int64 m_transactions_certified
 
int64 m_transactions_applied
 
int64 m_transactions_local
 
int64 m_transactions_negative_certified
 
int64 m_transactions_rows_validating
 
bool m_transaction_gtids_present
 
std::string m_transactions_committed_all_members
 
std::string m_transaction_last_conflict_free
 
int64 m_transactions_local_rollback
 
Flow_control_mode m_flow_control_mode
 

Additional Inherited Members

- Static Public Attributes inherited from Plugin_gcs_message
static const int PLUGIN_GCS_MESSAGE_VERSION = 1
 The protocol version number. More...
 
static const unsigned int WIRE_VERSION_SIZE = 4
 The protocol version number. More...
 
static const unsigned int WIRE_HD_LEN_SIZE = 2
 The on-the-wire size of the header length field. More...
 
static const unsigned int WIRE_MSG_LEN_SIZE = 8
 The on-the-wire size of the message size field. More...
 
static const unsigned int WIRE_CARGO_TYPE_SIZE = 2
 The on-the-wire size of the cargo type field. More...
 
static const unsigned int WIRE_FIXED_HEADER_SIZE
 The on-the-wire size of the fixed header. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_TYPE_SIZE = 2
 The on-the-wire size of the each payload item type field. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_LEN_SIZE = 8
 The on-the-wire size of the each payload item size field. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_HEADER_SIZE
 The on-the-wire size of the payload item header. More...
 
- Static Protected Member Functions inherited from Plugin_gcs_message
static int64_t get_sent_timestamp (const unsigned char *buffer, size_t length, const uint16 timestamp_payload_item_type)
 Return the time at which the message contained in the buffer was sent. More...
 
static void decode_payload_item_type_and_length (const unsigned char **buffer, uint16 *payload_item_type, unsigned long long *payload_item_length)
 Decodes the given payload item type and length from the buffer. More...
 
static void decode_payload_item_char (const unsigned char **buffer, uint16 *type, unsigned char *value)
 Decodes the given payload item (type, length and value) from the buffer as a char (1 byte). More...
 
static void decode_payload_item_int8 (const unsigned char **buffer, uint16 *type, uint64 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 8 bytes integer. More...
 

Detailed Description

Describes all statistics sent by members.

Member Enumeration Documentation

◆ enum_payload_item_type

Enumerator
PIT_UNKNOWN 
PIT_TRANSACTIONS_WAITING_CERTIFICATION 
PIT_TRANSACTIONS_WAITING_APPLY 
PIT_TRANSACTIONS_CERTIFIED 
PIT_TRANSACTIONS_APPLIED 
PIT_TRANSACTIONS_LOCAL 
PIT_TRANSACTIONS_NEGATIVE_CERTIFIED 
PIT_TRANSACTIONS_ROWS_VALIDATING 
PIT_TRANSACTIONS_COMMITTED_ALL_MEMBERS 
PIT_TRANSACTION_LAST_CONFLICT_FREE 
PIT_TRANSACTIONS_LOCAL_ROLLBACK 
PIT_FLOW_CONTROL_MODE 
PIT_TRANSACTION_GTIDS_PRESENT 
PIT_SENT_TIMESTAMP 
PIT_MAX 

Constructor & Destructor Documentation

◆ Pipeline_stats_member_message() [1/2]

Pipeline_stats_member_message::Pipeline_stats_member_message ( int32  transactions_waiting_certification,
int32  transactions_waiting_apply,
int64  transactions_certified,
int64  transactions_applied,
int64  transactions_local,
int64  transactions_negative_certified,
int64  transactions_rows_validating,
bool  transaction_gtids,
const std::string &  transactions_committed_all_members,
const std::string &  transactions_last_conflict_free,
int64  transactions_local_rollback,
Flow_control_mode  mode 
)

Message constructor.

Parameters
[in]transactions_waiting_certificationNumber of transactions pending certification
[in]transactions_waiting_applyNumber of remote transactions waiting apply
[in]transactions_certifiedNumber of transactions already certified
[in]transactions_appliedNumber of remote transactions applied
[in]transactions_localNumber of local transactions
[in]transactions_negative_certifiedNumber of transactions that were negatively certified
[in]transactions_rows_validatingNumber of transactions with which certification will be done against
[in]transaction_gtidsFlag to indicate whether or not the transaction ids have been updated
[in]transactions_committed_all_membersSet of transactions committed on all members
[in]transactions_last_conflict_freeLatest transaction certified without conflicts
[in]transactions_local_rollbackNumber of local transactions that were negatively certified
[in]modeFlow-control mode

◆ Pipeline_stats_member_message() [2/2]

Pipeline_stats_member_message::Pipeline_stats_member_message ( const unsigned char *  buf,
size_t  len 
)

Message constructor for raw data.

Parameters
[in]bufraw data
[in]lenraw length

◆ ~Pipeline_stats_member_message()

Pipeline_stats_member_message::~Pipeline_stats_member_message ( )
overridedefault

Message destructor.

Member Function Documentation

◆ decode_payload()

void Pipeline_stats_member_message::decode_payload ( const unsigned char *  buffer,
const unsigned char *  end 
)
overrideprotectedvirtual

Message decoding method.

Parameters
[in]bufferthe received data
[in]endthe end of the buffer

Implements Plugin_gcs_message.

◆ encode_payload()

void Pipeline_stats_member_message::encode_payload ( std::vector< unsigned char > *  buffer) const
overrideprotectedvirtual

Encodes the message contents for transmission.

Parameters
[out]bufferthe message buffer to be written

Implements Plugin_gcs_message.

◆ get_flow_control_mode()

Flow_control_mode Pipeline_stats_member_message::get_flow_control_mode ( )

Get flow-control mode of member.

Returns
the mode value

◆ get_sent_timestamp()

uint64_t Pipeline_stats_member_message::get_sent_timestamp ( const unsigned char *  buffer,
size_t  length 
)
static

Return the time at which the message contained in the buffer was sent.

See also
Metrics_handler::get_current_time()
Parameters
[in]bufferthe buffer to decode from.
[in]lengththe buffer length
Returns
the time on which the message was sent.

◆ get_transaction_committed_all_members()

const std::string & Pipeline_stats_member_message::get_transaction_committed_all_members ( )

Get set of stable group transactions.

Returns
the transaction identifier.

◆ get_transaction_last_conflict_free()

const std::string & Pipeline_stats_member_message::get_transaction_last_conflict_free ( )

Get last positive certified transaction.

Returns
the transaction identifier.

◆ get_transactions_applied()

int64 Pipeline_stats_member_message::get_transactions_applied ( )

Get transactions applied.

Returns
the counter value

◆ get_transactions_certified()

int64 Pipeline_stats_member_message::get_transactions_certified ( )

Get transactions certified.

Returns
the counter value

◆ get_transactions_local()

int64 Pipeline_stats_member_message::get_transactions_local ( )

Get local transactions that member tried to commit.

Returns
the counter value

◆ get_transactions_local_rollback()

int64 Pipeline_stats_member_message::get_transactions_local_rollback ( )

Get local transactions rolled back by the member.

Returns
the transaction identifiers.

◆ get_transactions_negative_certified()

int64 Pipeline_stats_member_message::get_transactions_negative_certified ( )

Get negatively certified transaction by member.

Returns
the counter value

◆ get_transactions_rows_validating()

int64 Pipeline_stats_member_message::get_transactions_rows_validating ( )

Get size of conflict detection database.

Returns
the counter value

◆ get_transactions_waiting_apply()

int32 Pipeline_stats_member_message::get_transactions_waiting_apply ( )

Get transactions waiting apply counter value.

Returns
the counter value

◆ get_transactions_waiting_certification()

int32 Pipeline_stats_member_message::get_transactions_waiting_certification ( )

Get transactions waiting certification counter value.

Returns
the counter value

◆ get_transation_gtids_present()

bool Pipeline_stats_member_message::get_transation_gtids_present ( ) const

Returns a flag indicating whether or not the GTIDs on this stats message are updated/present.

Returns
the flag indicating the presence of valid GTIDs on this message.

Member Data Documentation

◆ m_flow_control_mode

Flow_control_mode Pipeline_stats_member_message::m_flow_control_mode
private

◆ m_transaction_gtids_present

bool Pipeline_stats_member_message::m_transaction_gtids_present
private

◆ m_transaction_last_conflict_free

std::string Pipeline_stats_member_message::m_transaction_last_conflict_free
private

◆ m_transactions_applied

int64 Pipeline_stats_member_message::m_transactions_applied
private

◆ m_transactions_certified

int64 Pipeline_stats_member_message::m_transactions_certified
private

◆ m_transactions_committed_all_members

std::string Pipeline_stats_member_message::m_transactions_committed_all_members
private

◆ m_transactions_local

int64 Pipeline_stats_member_message::m_transactions_local
private

◆ m_transactions_local_rollback

int64 Pipeline_stats_member_message::m_transactions_local_rollback
private

◆ m_transactions_negative_certified

int64 Pipeline_stats_member_message::m_transactions_negative_certified
private

◆ m_transactions_rows_validating

int64 Pipeline_stats_member_message::m_transactions_rows_validating
private

◆ m_transactions_waiting_apply

int32 Pipeline_stats_member_message::m_transactions_waiting_apply
private

◆ m_transactions_waiting_certification

int32 Pipeline_stats_member_message::m_transactions_waiting_certification
private

The documentation for this class was generated from the following files: