CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <pthread.h>
#include "system_parameter.h"
#include "connection_globals.h"
#include "connection_cl.h"
#include "error_manager.h"
#include "utility.h"
#include "message_catalog.h"
#include "memory_alloc.h"
#include "porting.h"
#include "release_string.h"
#include "tcp.h"
#include "master_util.h"
#include "master_request.h"
#include "master_heartbeat.h"
Go to the source code of this file.
Macros | |
#define | IS_MASTER_SOCKET_FD(FD) ((FD) == css_Master_socket_fd[0] || (FD) == css_Master_socket_fd[1]) |
#define | SERVER_FORMAT_STRING " Server %s (rel %s, pid %d)\n" |
#define | HA_SERVER_FORMAT_STRING " HA-Server %s (rel %s, pid %d)\n" |
#define | HA_COPYLOGDB_FORMAT_STRING " HA-copylogdb %s (rel %s, pid %d)\n" |
#define | HA_APPLYLOGDB_FORMAT_STRING " HA-applylogdb %s (rel %s, pid %d)\n" |
Functions | |
static void | css_send_command_to_server (const SOCKET_QUEUE_ENTRY *sock_entry, int command) |
static void | css_send_message_to_server (const SOCKET_QUEUE_ENTRY *sock_entry, const char *message) |
static void | css_cleanup_info_connection (CSS_CONN_ENTRY *conn) |
static void | css_process_start_time_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_shutdown_time_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_server_count_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_all_count_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_server_list_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_all_list_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_kill_slave (CSS_CONN_ENTRY *conn, unsigned short request_id, char *server_name) |
static void | css_process_kill_immediate (CSS_CONN_ENTRY *conn, unsigned short request_id, char *server_name) |
static void | css_send_term_signal (int pid) |
static void | css_process_kill_master (void) |
static void | css_process_request_count_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_shutdown (char *time_buffer) |
static void | css_process_get_server_ha_mode (CSS_CONN_ENTRY *conn, unsigned short request_id, char *server_name) |
static void | css_process_get_eof (CSS_CONN_ENTRY *conn) |
static void | css_process_ha_node_list_info (CSS_CONN_ENTRY *conn, unsigned short request_id, bool verbose_yn) |
static void | css_process_ha_process_list_info (CSS_CONN_ENTRY *conn, unsigned short request_id, bool verbose_yn) |
static void | css_process_kill_all_ha_process (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_is_registered_ha_proc (CSS_CONN_ENTRY *conn, unsigned short request_id, char *buf) |
static void | css_process_ha_deregister_by_pid (CSS_CONN_ENTRY *conn, unsigned short request_id, char *pid_p) |
static void | css_process_ha_deregister_by_args (CSS_CONN_ENTRY *conn, unsigned short request_id, char *args) |
static void | css_process_reconfig_heartbeat (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_deact_stop_all (CSS_CONN_ENTRY *conn, unsigned short request_id, char *deact_immediately) |
static void | css_process_deact_confirm_stop_all (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_deactivate_heartbeat (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_deact_confirm_no_server (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_activate_heartbeat (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_register_ha_process (CSS_CONN_ENTRY *conn) |
static void | css_process_deregister_ha_process (CSS_CONN_ENTRY *conn) |
static void | css_process_change_ha_mode (CSS_CONN_ENTRY *conn) |
static void | css_process_ha_ping_host_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_ha_admin_info (CSS_CONN_ENTRY *conn, unsigned short request_id) |
static void | css_process_ha_start_util_process (CSS_CONN_ENTRY *conn, unsigned short request_id, char *args) |
static void | css_process_server_state (CSS_CONN_ENTRY *conn, unsigned short request_id, char *server_name) |
void | css_process_start_shutdown (SOCKET_QUEUE_ENTRY *sock_entq, int timeout, char *buffer) |
void | css_process_stop_shutdown (void) |
void | css_process_info_request (CSS_CONN_ENTRY *conn) |
void | css_process_heartbeat_request (CSS_CONN_ENTRY *conn) |
#define HA_APPLYLOGDB_FORMAT_STRING " HA-applylogdb %s (rel %s, pid %d)\n" |
Definition at line 70 of file master_request.c.
Referenced by css_process_all_list_info().
Definition at line 69 of file master_request.c.
Referenced by css_process_all_list_info().
#define HA_SERVER_FORMAT_STRING " HA-Server %s (rel %s, pid %d)\n" |
Definition at line 68 of file master_request.c.
Referenced by css_process_all_list_info(), and css_process_server_list_info().
#define IS_MASTER_SOCKET_FD | ( | FD | ) | ((FD) == css_Master_socket_fd[0] || (FD) == css_Master_socket_fd[1]) |
Definition at line 64 of file master_request.c.
Referenced by css_process_all_count_info(), css_process_all_list_info(), css_process_server_count_info(), css_process_server_list_info(), css_process_shutdown(), css_process_stop_shutdown(), css_send_command_to_server(), and css_send_message_to_server().
#define SERVER_FORMAT_STRING " Server %s (rel %s, pid %d)\n" |
Definition at line 67 of file master_request.c.
Referenced by css_process_all_list_info(), and css_process_server_list_info().
|
static |
Definition at line 153 of file master_request.c.
References css_Master_socket_anchor, and css_remove_entry_by_conn().
Referenced by css_process_activate_heartbeat(), css_process_all_count_info(), css_process_all_list_info(), css_process_deact_confirm_no_server(), css_process_deact_confirm_stop_all(), css_process_deact_stop_all(), css_process_deactivate_heartbeat(), css_process_deregister_ha_process(), css_process_get_server_ha_mode(), css_process_ha_admin_info(), css_process_ha_deregister_by_args(), css_process_ha_deregister_by_pid(), css_process_ha_node_list_info(), css_process_ha_ping_host_info(), css_process_ha_process_list_info(), css_process_ha_start_util_process(), css_process_heartbeat_request(), css_process_info_request(), css_process_is_registered_ha_proc(), css_process_kill_all_ha_process(), css_process_kill_immediate(), css_process_kill_slave(), css_process_reconfig_heartbeat(), css_process_request_count_info(), css_process_server_count_info(), css_process_server_list_info(), css_process_server_state(), css_process_shutdown_time_info(), and css_process_start_time_info().
|
static |
Definition at line 1710 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), error(), HA_DISABLED, HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_activate_heartbeat(), MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERROR, NO_ERRORS, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 258 of file master_request.c.
References cubregex::count(), css_cleanup_info_connection(), css_Master_socket_anchor, css_send_data(), socket_queue_entry::fd, htonl(), IS_INVALID_SOCKET, IS_MASTER_SOCKET_FD, socket_queue_entry::name, socket_queue_entry::next, and NO_ERRORS.
Referenced by css_process_info_request().
|
static |
Definition at line 385 of file master_request.c.
References css_cleanup_info_connection(), css_Master_socket_anchor, css_send_data(), socket_queue_entry::fd, free_and_init, HA_APPLYLOGDB_FORMAT_STRING, HA_COPYLOGDB_FORMAT_STRING, HA_SERVER_FORMAT_STRING, IS_INVALID_SOCKET, IS_MASTER_SOCKET_FD, socket_queue_entry::name, socket_queue_entry::next, NO_ERRORS, NULL, socket_queue_entry::pid, SERVER_FORMAT_STRING, strlen, and socket_queue_entry::version_string.
Referenced by css_process_info_request().
|
static |
Definition at line 891 of file master_request.c.
References hb_resource_receive_changemode().
Referenced by css_process_heartbeat_request().
|
static |
Definition at line 1553 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), error(), HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_finish_deactivate_server_info(), hb_get_deactivating_server_count(), MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1587 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), error(), HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_is_deactivation_ready(), MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1619 of file master_request.c.
References ARG_FILE_LINE, css_cleanup_info_connection(), css_get_peer_name(), css_send_data(), CUB_MAXHOSTNAMELEN, ER_ERROR_SEVERITY, ER_HB_COMMAND_EXECUTION, css_conn_entry::fd, HA_DISABLED, HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_check_request_eligibility(), HB_CMD_DEACTIVATE_STR, hb_Deactivate_immediately, hb_disable_er_log(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, HB_HC_FAILED, HB_HC_UNAUTHORIZED, hb_is_deactivation_started(), HB_NOLOG_REMOTE_STOP, hb_prepare_deactivate_heartbeat(), HB_RESULT_FAILURE_STR, hb_start_deactivate_server_info(), MASTER_ER_SET, MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERROR, NO_ERRORS, NULL, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1455 of file master_request.c.
References ARG_FILE_LINE, css_cleanup_info_connection(), css_get_peer_name(), css_send_data(), CUB_MAXHOSTNAMELEN, ER_ERROR_SEVERITY, ER_HB_COMMAND_EXECUTION, error(), css_conn_entry::fd, HA_DISABLED, HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_check_request_eligibility(), HB_CMD_DEACTIVATE_STR, hb_deactivate_heartbeat(), hb_disable_er_log(), hb_get_deactivating_server_count(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, HB_HC_FAILED, HB_HC_UNAUTHORIZED, HB_NOLOG_REMOTE_STOP, HB_RESULT_FAILURE_STR, MASTER_ER_SET, MASTER_MSG_FAILOVER_FINISHED, MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERROR, NO_ERRORS, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 864 of file master_request.c.
References css_cleanup_info_connection(), css_receive_heartbeat_data(), hb_deregister_by_pid(), NO_ERRORS, ntohl(), pid, and rv.
Referenced by css_process_heartbeat_request().
|
static |
Definition at line 1037 of file master_request.c.
References hb_resource_receive_get_eof().
Referenced by css_process_heartbeat_request().
|
static |
Definition at line 782 of file master_request.c.
References CHANGEMODE_MSG_BAD_MODE, CHANGEMODE_MSG_NOT_HA_MODE, CHANGEMODE_MSG_SERVER_MODE, socket_queue_entry::conn_ptr, css_cleanup_info_connection(), css_ha_server_state_string(), css_Master_socket_anchor, css_readn(), css_send_command_to_server(), css_send_data(), css_conn_entry::fd, HA_SERVER_STATE_DEAD, HA_SERVER_STATE_IDLE, HA_SERVER_STATE_NA, htonl(), MASTER_MSG_SERVER_NOT_FOUND, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_CHANGEMODE, MSGCAT_UTIL_SET_MASTER, socket_queue_entry::name, socket_queue_entry::next, NO_ERRORS, NULL, SERVER_GET_HA_MODE, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 971 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), css_conn_entry::fd, free_and_init, HA_DISABLED, hb_check_request_eligibility(), hb_get_admin_info_string(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, NULL, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1343 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), css_conn_entry::fd, HA_DISABLED, HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_check_request_eligibility(), hb_deregister_by_args(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1285 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), css_conn_entry::fd, HA_DISABLED, HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_check_request_eligibility(), hb_deregister_by_pid(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, ntohl(), pid, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1052 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), css_conn_entry::fd, free_and_init, HA_DISABLED, hb_check_request_eligibility(), hb_get_node_info_string(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, NULL, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 905 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), css_conn_entry::fd, free_and_init, HA_DISABLED, hb_check_request_eligibility(), hb_get_ping_host_info_string(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, NULL, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1120 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), css_conn_entry::fd, free_and_init, HA_DISABLED, hb_check_request_eligibility(), hb_get_process_info_string(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, NULL, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1759 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), error(), css_conn_entry::fd, HA_DISABLED, HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_check_request_eligibility(), HB_HC_ELIGIBLE_LOCAL, HB_HC_ELIGIBLE_REMOTE, hb_start_util_process(), MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERROR, NO_ERRORS, and strlen.
Referenced by css_process_info_request().
void css_process_heartbeat_request | ( | CSS_CONN_ENTRY * | conn | ) |
Definition at line 2011 of file master_request.c.
References ARG_FILE_LINE, css_cleanup_info_connection(), css_process_change_ha_mode(), css_process_deregister_ha_process(), css_process_get_eof(), css_process_register_ha_process(), css_receive_heartbeat_request(), error(), css_conn_entry::fd, hb_cleanup_conn_and_start_process(), INVALID_SOCKET, MASTER_ER_LOG_DEBUG, NO_ERRORS, NULL, SERVER_CHANGE_HA_MODE, SERVER_DEREGISTER_HA_PROCESS, SERVER_GET_EOF, and SERVER_REGISTER_HA_PROCESS.
Referenced by css_check_master_socket_input().
void css_process_info_request | ( | CSS_CONN_ENTRY * | conn | ) |
Definition at line 1855 of file master_request.c.
References ACTIVATE_HEARTBEAT, CANCEL_SHUTDOWN, css_cleanup_info_connection(), css_process_activate_heartbeat(), css_process_all_count_info(), css_process_all_list_info(), css_process_deact_confirm_no_server(), css_process_deact_confirm_stop_all(), css_process_deact_stop_all(), css_process_deactivate_heartbeat(), css_process_get_server_ha_mode(), css_process_ha_admin_info(), css_process_ha_deregister_by_args(), css_process_ha_deregister_by_pid(), css_process_ha_node_list_info(), css_process_ha_ping_host_info(), css_process_ha_process_list_info(), css_process_ha_start_util_process(), css_process_is_registered_ha_proc(), css_process_kill_all_ha_process(), css_process_kill_immediate(), css_process_kill_master(), css_process_kill_slave(), css_process_reconfig_heartbeat(), css_process_request_count_info(), css_process_server_count_info(), css_process_server_list_info(), css_process_server_state(), css_process_shutdown(), css_process_shutdown_time_info(), css_process_start_time_info(), css_process_stop_shutdown(), css_receive_data(), css_receive_request(), DEACT_CONFIRM_NO_SERVER, DEACT_CONFIRM_STOP_ALL, DEACT_STOP_ALL, DEACTIVATE_HEARTBEAT, DEREGISTER_HA_PROCESS_BY_ARGS, DEREGISTER_HA_PROCESS_BY_PID, free_and_init, GET_ALL_COUNT, GET_ALL_LIST, GET_HA_ADMIN_INFO, GET_HA_NODE_LIST, GET_HA_NODE_LIST_VERBOSE, GET_HA_PING_HOST_INFO, GET_HA_PROCESS_LIST, GET_HA_PROCESS_LIST_VERBOSE, GET_REQUEST_COUNT, GET_SERVER_COUNT, GET_SERVER_HA_MODE, GET_SERVER_LIST, GET_SERVER_STATE, GET_SHUTDOWN_TIME, GET_START_TIME, IS_REGISTERED_HA_PROC, KILL_ALL_HA_PROCESS, KILL_MASTER_SERVER, KILL_SERVER_IMMEDIATE, KILL_SLAVE_SERVER, NO_ERRORS, NULL, rc, RECONFIG_HEARTBEAT, START_HA_UTIL_PROCESS, and START_SHUTDOWN.
Referenced by css_check_master_socket_input().
|
static |
Definition at line 1244 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), HA_DISABLED, HA_REQUEST_FAILURE, HA_REQUEST_RESULT_SIZE, HA_REQUEST_SUCCESS, hb_is_registered_process(), MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1186 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), free_and_init, HA_DISABLED, hb_kill_all_heartbeat_process(), MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, NULL, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 570 of file master_request.c.
References css_cleanup_info_connection(), css_Master_socket_anchor, css_send_command_to_server(), css_send_data(), IS_MASTER_CONN_NAME_HA_APPLYLOG, IS_MASTER_CONN_NAME_HA_COPYLOG, IS_MASTER_CONN_NAME_HA_SERVER, MASTER_MSG_SERVER_NOT_FOUND, MASTER_MSG_SERVER_NOTIFIED, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, socket_queue_entry::name, socket_queue_entry::next, NO_ERRORS, NULL, SERVER_SHUTDOWN_IMMEDIATE, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 629 of file master_request.c.
References ARG_FILE_LINE, cluster_Jobs, css_get_master_domain_path(), css_Master_socket_fd, css_shutdown_socket(), ER_ALL_FINAL, er_final(), ER_HB_STOPPED, ER_NOTIFICATION_SEVERITY, HA_DISABLED, hb_Cluster, hb_cluster_shutdown_and_cleanup(), hb_Resource, hb_resource_shutdown_and_cleanup(), MASTER_ER_SET, and resource_Jobs.
Referenced by css_process_info_request().
|
static |
Definition at line 497 of file master_request.c.
References css_cleanup_info_connection(), css_Master_socket_anchor, css_process_start_shutdown(), css_receive_data(), css_send_data(), free_and_init, hb_deregister_by_pid(), IS_MASTER_CONN_NAME_HA_SERVER, MASTER_MSG_SERVER_NOT_FOUND, MASTER_MSG_SERVER_NOTIFIED, MASTER_MSG_SERVER_STATUS, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, socket_queue_entry::name, socket_queue_entry::next, NO_ERRORS, ntohl(), NULL, socket_queue_entry::pid, rc, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 1400 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), free_and_init, HA_DISABLED, hb_reconfig_heartbeat(), MASTER_MSG_PROCESS_ERROR, MASTER_TO_SRV_MSG_SIZE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, NO_ERRORS, NULL, and strlen.
Referenced by css_process_info_request().
|
static |
Definition at line 848 of file master_request.c.
References hb_register_new_process().
Referenced by css_process_heartbeat_request().
|
static |
Definition at line 665 of file master_request.c.
References cubregex::count(), css_cleanup_info_connection(), css_send_data(), css_Total_request_count, htonl(), and NO_ERRORS.
Referenced by css_process_info_request().
|
static |
Definition at line 229 of file master_request.c.
References cubregex::count(), css_cleanup_info_connection(), css_Master_socket_anchor, css_send_data(), socket_queue_entry::fd, htonl(), IS_INVALID_SOCKET, IS_MASTER_CONN_NAME_DRIVER, IS_MASTER_CONN_NAME_HA_APPLYLOG, IS_MASTER_CONN_NAME_HA_COPYLOG, IS_MASTER_SOCKET_FD, socket_queue_entry::name, socket_queue_entry::next, and NO_ERRORS.
Referenced by css_process_info_request().
|
static |
Definition at line 285 of file master_request.c.
References css_cleanup_info_connection(), css_Master_socket_anchor, css_send_data(), socket_queue_entry::fd, free_and_init, HA_SERVER_FORMAT_STRING, IS_INVALID_SOCKET, IS_MASTER_CONN_NAME_DRIVER, IS_MASTER_CONN_NAME_HA_APPLYLOG, IS_MASTER_CONN_NAME_HA_COPYLOG, IS_MASTER_CONN_NAME_HA_SERVER, IS_MASTER_SOCKET_FD, socket_queue_entry::name, socket_queue_entry::next, NO_ERRORS, NULL, socket_queue_entry::pid, SERVER_FORMAT_STRING, strlen, and socket_queue_entry::version_string.
Referenced by css_process_info_request().
|
static |
Definition at line 1819 of file master_request.c.
References css_cleanup_info_connection(), css_Master_socket_anchor, css_return_entry_of_server(), css_send_data(), socket_queue_entry::fd, socket_queue_entry::ha_mode, HB_PSTATE_DEAD, HB_PSTATE_UNKNOWN, hb_return_proc_state_by_fd(), htonl(), IS_INVALID_SOCKET, NO_ERRORS, and NULL.
Referenced by css_process_info_request().
|
static |
Definition at line 701 of file master_request.c.
References ARG_FILE_LINE, css_Master_socket_anchor, css_Master_timeout, css_process_start_shutdown(), ER_WARNING_SEVERITY, ERR_CSS_MINFO_MESSAGE, socket_queue_entry::fd, free_and_init, IS_INVALID_SOCKET, IS_MASTER_CONN_NAME_DRIVER, IS_MASTER_CONN_NAME_HA_APPLYLOG, IS_MASTER_CONN_NAME_HA_COPYLOG, IS_MASTER_CONN_NAME_HA_SERVER, IS_MASTER_SOCKET_FD, MASTER_ER_SET, MASTER_MSG_GOING_DOWN, MASTER_TO_SRV_MSG_SIZE, master_util_wait_proc_terminate(), MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_MASTER, socket_queue_entry::name, socket_queue_entry::next, ntohl(), NULL, and socket_queue_entry::pid.
Referenced by css_process_info_request().
|
static |
Definition at line 183 of file master_request.c.
References css_cleanup_info_connection(), css_Master_timeout, css_send_data(), NO_ERRORS, NULL, rel_release_string(), and strlen.
Referenced by css_process_info_request().
void css_process_start_shutdown | ( | SOCKET_QUEUE_ENTRY * | sock_entq, |
int | timeout, | ||
char * | buffer | ||
) |
Definition at line 684 of file master_request.c.
References css_send_command_to_server(), css_send_message_to_server(), and SERVER_START_SHUTDOWN.
Referenced by css_process_kill_slave(), css_process_shutdown(), hb_resource_demote_start_shutdown_server_proc(), hb_resource_job_proc_dereg(), and hb_resource_shutdown_all_ha_procs().
|
static |
Definition at line 165 of file master_request.c.
References css_cleanup_info_connection(), css_send_data(), css_Start_time, and NO_ERRORS.
Referenced by css_process_info_request().
void css_process_stop_shutdown | ( | void | ) |
Definition at line 753 of file master_request.c.
References css_Master_socket_anchor, css_Master_timeout, css_send_command_to_server(), socket_queue_entry::fd, free_and_init, IS_INVALID_SOCKET, IS_MASTER_CONN_NAME_DRIVER, IS_MASTER_CONN_NAME_HA_APPLYLOG, IS_MASTER_CONN_NAME_HA_COPYLOG, IS_MASTER_CONN_NAME_HA_SERVER, IS_MASTER_SOCKET_FD, socket_queue_entry::name, socket_queue_entry::next, NULL, and SERVER_STOP_SHUTDOWN.
Referenced by css_process_info_request().
|
static |
Definition at line 119 of file master_request.c.
References socket_queue_entry::conn_ptr, css_conn_entry::fd, htonl(), socket_queue_entry::info_p, IS_INVALID_SOCKET, and IS_MASTER_SOCKET_FD.
Referenced by css_process_get_server_ha_mode(), css_process_kill_immediate(), css_process_start_shutdown(), and css_process_stop_shutdown().
|
static |
Definition at line 138 of file master_request.c.
References socket_queue_entry::conn_ptr, css_conn_entry::fd, socket_queue_entry::info_p, IS_INVALID_SOCKET, IS_MASTER_SOCKET_FD, and MASTER_TO_SRV_MSG_SIZE.
Referenced by css_process_start_shutdown().
|
static |
Definition at line 607 of file master_request.c.
References FALSE.