MySQL  8.0.22
Source Code Documentation
xcom_detector.cc File Reference
#include <assert.h>
#include <stdlib.h>
#include "xcom/app_data.h"
#include "xcom/xcom_profile.h"
#include "my_compiler.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/sock_probe.h"
#include "xcom/synode_no.h"
#include "xcom/task.h"
#include "xcom/task_debug.h"
#include "xcom/x_platform.h"
#include "xcom/xcom_base.h"
#include "xcom/xcom_common.h"
#include "xcom/xcom_detector.h"
#include "xcom/xcom_interface.h"
#include "xcom/xcom_transport.h"
#include "xdr_gen/xcom_vp.h"

Macros

#define MAX_SILENT   4.0
 
#define DETECT(site, i)
 

Functions

int may_be_dead (detector_state const ds, node_no i, double seconds)
 
void init_detector (detector_state ds)
 
int note_detected (site_def const *site, node_no node)
 
int is_server_connected (struct site_def const *site, node_no node)
 States if a server is still physically connected to another server. More...
 
static void reset_detected (site_def const *site, u_int node)
 
void reset_disjunct_servers (struct site_def const *old_site, struct site_def const *new_site)
 
static void dbg_detected (site_def *site)
 
void update_detected (site_def *site)
 
int enough_live_nodes (site_def *site)
 
static void send_my_view (site_def const *site)
 
static void update_global_count (site_def *site)
 
static void check_global_node_set (site_def *site, int *notify)
 
static void check_local_node_set (site_def *site, int *notify)
 
static node_no leader (site_def const *s)
 
int iamtheleader (site_def const *s)
 
void invalidate_detector_sites (site_def *site)
 
int detector_task (task_arg arg)
 
node_set detector_node_set (site_def const *site)
 
void send_global_view ()
 
static void validate_update_configuration (site_def const *site, synode_no alive_synode)
 
int alive_task (task_arg arg)
 

Variables

task_envdetector
 
int xcom_shutdown
 
linkage detector_wait
 
synode_no executed_msg
 
synode_no max_synode
 
static site_deflast_p_site = 0
 
static site_deflast_x_site = 0
 

Macro Definition Documentation

◆ DETECT

#define DETECT (   site,
 
)
Value:
(i == get_nodeno(site)) || \
(site->detected[i] + DETECTOR_LIVE_TIMEOUT > task_now())
#define DETECTOR_LIVE_TIMEOUT
Definition: xcom_detector.h:28
node_no get_nodeno(site_def const *site)
Definition: site_def.cc:383
double task_now()
Definition: task.cc:309

◆ MAX_SILENT

#define MAX_SILENT   4.0

Function Documentation

◆ alive_task()

int alive_task ( task_arg  arg)

◆ check_global_node_set()

static void check_global_node_set ( site_def site,
int *  notify 
)
static

◆ check_local_node_set()

static void check_local_node_set ( site_def site,
int *  notify 
)
static

◆ dbg_detected()

static void dbg_detected ( site_def site)
static

◆ detector_node_set()

node_set detector_node_set ( site_def const *  site)

◆ detector_task()

int detector_task ( task_arg  arg)

◆ enough_live_nodes()

int enough_live_nodes ( site_def site)

◆ iamtheleader()

int iamtheleader ( site_def const *  s)

◆ init_detector()

void init_detector ( detector_state  ds)

◆ invalidate_detector_sites()

void invalidate_detector_sites ( site_def site)

◆ is_server_connected()

int is_server_connected ( struct site_def const *  site,
node_no  node 
)

States if a server is still physically connected to another server.

This will test the connection state to that node.

Parameters
sitesite definition that contains the server collections.
nodenode index that we want to test for connectivity
Returns
1 if the server is connected. 0 otherwise.

◆ leader()

static node_no leader ( site_def const *  s)
static

◆ may_be_dead()

int may_be_dead ( detector_state const  ds,
node_no  i,
double  seconds 
)

◆ note_detected()

int note_detected ( site_def const *  site,
node_no  node 
)

◆ reset_detected()

static void reset_detected ( site_def const *  site,
u_int  node 
)
static

◆ reset_disjunct_servers()

void reset_disjunct_servers ( struct site_def const *  old_site,
struct site_def const *  new_site 
)

◆ send_global_view()

void send_global_view ( )

◆ send_my_view()

static void send_my_view ( site_def const *  site)
static

◆ update_detected()

void update_detected ( site_def site)

◆ update_global_count()

static void update_global_count ( site_def site)
static

◆ validate_update_configuration()

static void validate_update_configuration ( site_def const *  site,
synode_no  alive_synode 
)
static

Variable Documentation

◆ detector

task_env* detector

◆ detector_wait

linkage detector_wait

◆ executed_msg

synode_no executed_msg

◆ last_p_site

site_def* last_p_site = 0
static

◆ last_x_site

site_def* last_x_site = 0
static

◆ max_synode

synode_no max_synode

◆ xcom_shutdown

int xcom_shutdown