MySQL 8.0.39
Source Code Documentation
xcom_interface.cc File Reference
#include "xcom/xcom_interface.h"
#include <assert.h>
#include <stdlib.h>
#include "xcom/app_data.h"
#include "xcom/bitset.h"
#include "xcom/node_list.h"
#include "xcom/node_no.h"
#include "xcom/node_set.h"
#include "xcom/pax_msg.h"
#include "xcom/server_struct.h"
#include "xcom/simset.h"
#include "xcom/site_def.h"
#include "xcom/site_struct.h"
#include "xcom/synode_no.h"
#include "xcom/task.h"
#include "xcom/task_debug.h"
#include "xcom/xcom_base.h"
#include "xcom/xcom_cache.h"
#include "xcom/xcom_common.h"
#include "xcom/xcom_detector.h"
#include "xcom/xcom_memory.h"
#include "xcom/xcom_profile.h"
#include "xcom/xcom_transport.h"
#include "xcom/xcom_vp_str.h"
#include "xdr_gen/xcom_vp.h"

Functions

void set_xcom_data_receiver (xcom_data_receiver x)
 
void set_xcom_local_view_receiver (xcom_local_view_receiver x)
 
void set_xcom_global_view_receiver (xcom_global_view_receiver x)
 
void set_xcom_config_receiver (xcom_config_receiver x)
 
void set_xcom_logger (xcom_logger x)
 
void set_xcom_debugger (xcom_debugger x)
 
void set_xcom_debugger_check (xcom_debugger_check x)
 
void deliver_to_app (pax_machine *pma, app_data_ptr app, delivery_status app_status)
 Delivers the app payload to XCom's upper layer, e.g. More...
 
void deliver_view_msg (site_def const *site)
 Deliver a view message. More...
 
void deliver_global_view_msg (site_def const *site, node_set const ns, synode_no message_id)
 
void deliver_config (app_data_ptr a)
 
void deinit_xcom_interface ()
 

Variables

static xcom_full_data_receiver xcom_full_receive_data
 
static xcom_full_local_view_receiver xcom_full_receive_local_view
 
static xcom_full_global_view_receiver xcom_full_receive_global_view
 
static xcom_data_receiver xcom_receive_data
 
static xcom_local_view_receiver xcom_receive_local_view
 
static xcom_global_view_receiver xcom_receive_global_view
 
static xcom_config_receiver xcom_receive_config = nullptr
 
xcom_logger xcom_log = nullptr
 Callbacks used in the logging macros. More...
 
xcom_debugger xcom_debug = nullptr
 
xcom_debugger_check xcom_debug_check = nullptr
 
int64_t xcom_debug_options = GCS_DEBUG_NONE
 Define the set of debug and trace options that are enabled if there is no debugger check injected. More...
 

Function Documentation

◆ deinit_xcom_interface()

void deinit_xcom_interface ( )

◆ deliver_config()

void deliver_config ( app_data_ptr  a)

◆ deliver_global_view_msg()

void deliver_global_view_msg ( site_def const *  site,
node_set const  ns,
synode_no  message_id 
)

◆ deliver_to_app()

void deliver_to_app ( pax_machine pma,
app_data_ptr  app,
delivery_status  app_status 
)

Delivers the app payload to XCom's upper layer, e.g.

GCS.

Please note the following contract regarding the parameter of this function: If app_status is delivery_ok, then it means that XCom reached consensus on app. In this situation, pma MUST point to the Paxos instance (pax_machine) where app got consensus on. In other words, pma MUST NOT be NULL.

In summary, this function is expected to be called as follows if a payload p reached consensus:

deliver_to_app(<pointer to pax_machine where p was decided>, p, delivery_ok)

This function is expected to be called as follows if a payload p did NOT reach consensus:

deliver_to_app(_, p, delivery_failure)

Where the pma argument may be a pointer to the pax_machine where p failed to get consensus, or NULL.

Failure do adhere to this contract will result in an assert failure, at least on non-release builds.

Parameters
pmaThe Paxos instance where the app payload obtained consensus
appThe payload that was decided for the Paxos instance pma
app_statusThe reason for app delivery: delivery_ok if the app payload reached consensus on the pma Paxos instance, or delivery_failure if XCom was unable to reach consensus

◆ deliver_view_msg()

void deliver_view_msg ( site_def const *  site)

Deliver a view message.

◆ set_xcom_config_receiver()

void set_xcom_config_receiver ( xcom_config_receiver  x)

◆ set_xcom_data_receiver()

void set_xcom_data_receiver ( xcom_data_receiver  x)

◆ set_xcom_debugger()

void set_xcom_debugger ( xcom_debugger  x)

◆ set_xcom_debugger_check()

void set_xcom_debugger_check ( xcom_debugger_check  x)

◆ set_xcom_global_view_receiver()

void set_xcom_global_view_receiver ( xcom_global_view_receiver  x)

◆ set_xcom_local_view_receiver()

void set_xcom_local_view_receiver ( xcom_local_view_receiver  x)

◆ set_xcom_logger()

void set_xcom_logger ( xcom_logger  x)

Variable Documentation

◆ xcom_debug

xcom_debugger xcom_debug = nullptr

◆ xcom_debug_check

xcom_debugger_check xcom_debug_check = nullptr

◆ xcom_debug_options

int64_t xcom_debug_options = GCS_DEBUG_NONE

Define the set of debug and trace options that are enabled if there is no debugger check injected.

◆ xcom_full_receive_data

xcom_full_data_receiver xcom_full_receive_data
static

◆ xcom_full_receive_global_view

xcom_full_global_view_receiver xcom_full_receive_global_view
static

◆ xcom_full_receive_local_view

xcom_full_local_view_receiver xcom_full_receive_local_view
static

◆ xcom_log

xcom_logger xcom_log = nullptr

Callbacks used in the logging macros.

◆ xcom_receive_config

xcom_config_receiver xcom_receive_config = nullptr
static

◆ xcom_receive_data

xcom_data_receiver xcom_receive_data
static

◆ xcom_receive_global_view

xcom_global_view_receiver xcom_receive_global_view
static

◆ xcom_receive_local_view

xcom_local_view_receiver xcom_receive_local_view
static