CUBRID Engine
latest
|
#include "boot.h"
#include "error_manager.h"
#include "memory_alloc.h"
#include "porting.h"
#include "thread_compat.hpp"
#include <stdio.h>
#include <poll.h>
Go to the source code of this file.
Classes | |
struct | packet_header |
struct | css_queue_entry |
struct | css_conn_entry |
struct | css_mapping_entry |
struct | last_access_status |
Typedefs | |
typedef enum css_server_request | CSS_SERVER_REQUEST |
typedef enum ha_mode | HA_MODE |
typedef enum ha_server_mode | HA_SERVER_MODE |
typedef enum ha_log_applier_state | HA_LOG_APPLIER_STATE |
typedef struct packet_header | NET_HEADER |
typedef struct css_queue_entry | CSS_QUEUE_ENTRY |
typedef struct css_conn_entry | CSS_CONN_ENTRY |
typedef struct css_mapping_entry | CSS_MAP_ENTRY |
typedef struct last_access_status | LAST_ACCESS_STATUS |
#define CHECK_CLIENT_IS_ALIVE | ( | ) |
Definition at line 254 of file connection_defs.h.
Referenced by css_connection_handler_thread().
#define CHECK_SERVER_IS_ALIVE | ( | ) |
Definition at line 257 of file connection_defs.h.
Referenced by css_net_recv().
#define CSS_ENTRYID_FROM_EID | ( | eid | ) | ((unsigned short) HIGH16BITS(eid)) |
Definition at line 368 of file connection_defs.h.
Referenced by css_cleanup_server_queues(), css_return_entry_from_eid(), and css_send_reply_and_data_to_client().
Definition at line 367 of file connection_defs.h.
Referenced by css_queue_receive_data_buffer(), css_receive_data_from_client_with_timeout(), css_receive_data_from_server_with_timeout(), css_send_abort_to_client(), css_send_data_to_client(), css_send_data_to_server(), css_send_error_to_client(), css_send_error_to_server(), css_send_reply_and_2_data_to_client(), css_send_reply_and_3_data_to_client(), css_send_reply_and_data_to_client(), css_test_for_client_errors(), css_test_for_server_errors(), and net_client_request_with_callback().
#define DEFAULT_HEADER_DATA {0,0,0,NULL_TRAN_INDEX,0,0,0,0,0} |
Definition at line 365 of file connection_defs.h.
Referenced by css_abort_request(), css_is_shutdown_timeout_expired(), css_queue_command_packet(), css_read_and_queue(), css_read_one_request(), css_receive_data(), css_receive_error(), css_refuse_connection_request(), css_send_close_request(), css_send_data(), css_send_error(), css_send_request_with_data_buffer(), and css_send_request_with_socket().
#define HA_CHANGE_MODE_DEFAULT_TIMEOUT_IN_SECS 5 |
Definition at line 324 of file connection_defs.h.
Referenced by changemode().
#define HA_CHANGE_MODE_IMMEDIATELY 0 |
Definition at line 325 of file connection_defs.h.
Referenced by boot_restart_server(), and css_process_change_server_ha_mode_request().
#define HA_DELAY_ERR_CORRECTION 1 |
Definition at line 327 of file connection_defs.h.
Referenced by log_is_log_flush_daemon_available().
#define HA_DISABLED | ( | ) | (HA_GET_MODE () == HA_MODE_OFF) |
Definition at line 283 of file connection_defs.h.
Referenced by applyinfo(), applylogdb(), boot_restart_server(), btree_insert_internal(), cfg_read_directory(), changemode(), copylogdb(), csql_print_database(), css_change_ha_server_state(), css_init(), css_master_cleanup(), css_master_thread(), css_pack_server_name(), css_process_activate_heartbeat(), css_process_deact_stop_all(), css_process_deactivate_heartbeat(), css_process_get_server_ha_mode_request(), 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_master(), css_process_reconfig_heartbeat(), css_transit_ha_server_state(), do_execute_statement(), do_statement(), hb_master_init(), log_does_allow_replication(), logpb_archive_active_log(), logpb_flush_all_append_pages(), and main().
#define HA_GET_MODE | ( | ) | ((HA_MODE) prm_get_integer_value (PRM_ID_HA_MODE)) |
Definition at line 282 of file connection_defs.h.
Referenced by applyinfo(), applylogdb(), boot_restart_server(), css_get_required_conn_num_for_ha(), hb_cluster_initialize(), and server_capabilities().
#define HA_LOG_APPLIER_STATE_DONE_STR "done" |
Definition at line 321 of file connection_defs.h.
Referenced by css_ha_applier_state_string().
#define HA_LOG_APPLIER_STATE_ERROR_STR "error" |
Definition at line 322 of file connection_defs.h.
Referenced by css_ha_applier_state_string().
#define HA_LOG_APPLIER_STATE_RECOVERING_STR "recovering" |
Definition at line 319 of file connection_defs.h.
Referenced by css_ha_applier_state_string().
#define HA_LOG_APPLIER_STATE_UNREGISTERED_STR "unregistered" |
Definition at line 318 of file connection_defs.h.
Referenced by css_ha_applier_state_string().
#define HA_LOG_APPLIER_STATE_WORKING_STR "working" |
Definition at line 320 of file connection_defs.h.
Referenced by css_ha_applier_state_string().
#define HA_MODE_FAIL_BACK_STR "fail-back" |
Definition at line 276 of file connection_defs.h.
#define HA_MODE_FAIL_OVER_STR "fail-over" |
Definition at line 275 of file connection_defs.h.
#define HA_MODE_LAZY_BACK_STR "lazy-back" |
Definition at line 277 of file connection_defs.h.
#define HA_MODE_OFF_STR "off" |
Definition at line 274 of file connection_defs.h.
Referenced by css_ha_mode_string().
#define HA_MODE_ON_STR "on" |
Definition at line 280 of file connection_defs.h.
Referenced by css_ha_mode_string().
#define HA_MODE_REPLICA_STR "replica" |
Definition at line 279 of file connection_defs.h.
Referenced by css_ha_mode_string().
#define HA_MODE_ROLE_CHANGE_STR "role-change" |
Definition at line 278 of file connection_defs.h.
#define HA_REQUEST_FAILURE "0\0" |
Definition at line 330 of file connection_defs.h.
Referenced by css_process_activate_heartbeat(), css_process_deact_confirm_no_server(), css_process_deact_confirm_stop_all(), css_process_deact_stop_all(), css_process_deactivate_heartbeat(), css_process_ha_deregister_by_args(), css_process_ha_deregister_by_pid(), css_process_ha_start_util_process(), and css_process_is_registered_ha_proc().
#define HA_REQUEST_RESULT_SIZE 2 |
Definition at line 331 of file connection_defs.h.
Referenced by css_process_activate_heartbeat(), css_process_deact_confirm_no_server(), css_process_deact_confirm_stop_all(), css_process_deact_stop_all(), css_process_deactivate_heartbeat(), css_process_ha_deregister_by_args(), css_process_ha_deregister_by_pid(), css_process_ha_start_util_process(), and css_process_is_registered_ha_proc().
#define HA_REQUEST_SUCCESS "1\0" |
Definition at line 329 of file connection_defs.h.
Referenced by css_process_activate_heartbeat(), css_process_deact_confirm_no_server(), css_process_deact_confirm_stop_all(), css_process_deact_stop_all(), css_process_deactivate_heartbeat(), css_process_ha_deregister_by_args(), css_process_ha_deregister_by_pid(), css_process_ha_start_util_process(), css_process_is_registered_ha_proc(), process_activate_heartbeat(), process_deact_confirm_no_server(), process_deact_confirm_stop_all(), process_deact_stop_all(), process_deactivate_heartbeat(), process_ha_deregister_by_args(), process_ha_deregister_by_pid(), process_ha_start_util_process(), and process_is_registered_proc().
#define HA_SERVER_MODE_ACTIVE_STR "active" |
Definition at line 298 of file connection_defs.h.
#define HA_SERVER_MODE_BACKUP_STR "backup" |
Definition at line 300 of file connection_defs.h.
#define HA_SERVER_MODE_PRIMARY_STR "primary" |
Definition at line 301 of file connection_defs.h.
#define HA_SERVER_MODE_SECONDARY_STR "secondary" |
Definition at line 302 of file connection_defs.h.
#define HA_SERVER_MODE_STANDBY_STR "standby" |
Definition at line 299 of file connection_defs.h.
#define HA_SERVER_MODE_TERNARY_STR "ternary" |
Definition at line 303 of file connection_defs.h.
#define HIGH16BITS | ( | X | ) | (((X) >> 16) & 0xffffL) |
Definition at line 363 of file connection_defs.h.
#define LOW16BITS | ( | X | ) | ((X) & 0xffffL) |
Definition at line 364 of file connection_defs.h.
#define MASTER_TO_SRV_MSG_SIZE 1024 |
Definition at line 339 of file connection_defs.h.
Referenced by css_process_activate_heartbeat(), 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_slave(), css_process_reconfig_heartbeat(), css_process_shutdown(), css_process_shutdown_request(), css_send_message_to_server(), hb_resource_demote_start_shutdown_server_proc(), hb_resource_job_proc_dereg(), and hb_resource_shutdown_all_ha_procs().
#define NET_HEADER_FLAG_INVALIDATE_SNAPSHOT 0x8000 |
Definition at line 370 of file connection_defs.h.
Referenced by css_abort_request(), css_queue_packet(), css_queue_unexpected_packet(), css_read_header(), css_send_close_request(), and css_set_net_header().
#define NUM_MASTER_CHANNEL 1 |
Definition at line 57 of file connection_defs.h.
Referenced by css_init_conn_list().
#define TPRINTF | ( | error_string, | |
arg | |||
) |
Definition at line 358 of file connection_defs.h.
Referenced by css_open_new_socket_from_master(), css_queue_unexpected_packet(), css_return_queued_request(), and main().
#define TPRINTF2 | ( | error_string, | |
arg1, | |||
arg2 | |||
) |
Definition at line 359 of file connection_defs.h.
typedef struct css_conn_entry CSS_CONN_ENTRY |
Definition at line 422 of file connection_defs.h.
typedef struct css_mapping_entry CSS_MAP_ENTRY |
Definition at line 496 of file connection_defs.h.
typedef struct css_queue_entry CSS_QUEUE_ENTRY |
Definition at line 393 of file connection_defs.h.
typedef enum css_server_request CSS_SERVER_REQUEST |
Definition at line 155 of file connection_defs.h.
typedef enum ha_log_applier_state HA_LOG_APPLIER_STATE |
Definition at line 317 of file connection_defs.h.
Definition at line 273 of file connection_defs.h.
typedef enum ha_server_mode HA_SERVER_MODE |
Definition at line 297 of file connection_defs.h.
typedef struct last_access_status LAST_ACCESS_STATUS |
Definition at line 511 of file connection_defs.h.
typedef struct packet_header NET_HEADER |
Definition at line 376 of file connection_defs.h.
anonymous enum |
Enumerator | |
---|---|
READ_WRITE | |
READ_ONLY | |
WRITE_ONLY |
Definition at line 171 of file connection_defs.h.
enum css_check_peer_alive |
Enumerator | |
---|---|
CSS_CHECK_PEER_ALIVE_NONE | |
CSS_CHECK_PEER_ALIVE_SERVER_ONLY | |
CSS_CHECK_PEER_ALIVE_CLIENT_ONLY | |
CSS_CHECK_PEER_ALIVE_BOTH |
Definition at line 247 of file connection_defs.h.
enum css_client_request |
Definition at line 91 of file connection_defs.h.
enum css_command_type |
Enumerator | |
---|---|
NULL_REQUEST | |
INFO_REQUEST | |
DATA_REQUEST | |
SERVER_REQUEST | |
UNUSED_REQUEST | |
SERVER_REQUEST_NEW | |
MAX_REQUEST |
Definition at line 64 of file connection_defs.h.
enum css_conn_status |
Enumerator | |
---|---|
CONN_OPEN | |
CONN_CLOSED | |
CONN_CLOSING |
Definition at line 161 of file connection_defs.h.
enum css_error_code |
Definition at line 211 of file connection_defs.h.
enum css_master_response |
Enumerator | |
---|---|
SERVER_ALREADY_EXISTS | |
SERVER_REQUEST_ACCEPTED | |
DRIVER_NOT_FOUND | |
SERVER_REQUEST_ACCEPTED_NEW |
Definition at line 79 of file connection_defs.h.
enum css_packet_type |
Enumerator | |
---|---|
COMMAND_TYPE | |
DATA_TYPE | |
ABORT_TYPE | |
CLOSE_TYPE | |
ERROR_TYPE |
Definition at line 181 of file connection_defs.h.
enum css_server_request |
Definition at line 139 of file connection_defs.h.
enum css_status |
Definition at line 194 of file connection_defs.h.
enum css_status_code |
Enumerator | |
---|---|
CSS_NO_ERRORS | |
CSS_UNPLANNED_SHUTDOWN | |
CSS_PLANNED_SHUTDOWN |
Definition at line 237 of file connection_defs.h.
enum ha_log_applier_state |
Enumerator | |
---|---|
HA_LOG_APPLIER_STATE_NA | |
HA_LOG_APPLIER_STATE_UNREGISTERED | |
HA_LOG_APPLIER_STATE_RECOVERING | |
HA_LOG_APPLIER_STATE_WORKING | |
HA_LOG_APPLIER_STATE_DONE | |
HA_LOG_APPLIER_STATE_ERROR |
Definition at line 308 of file connection_defs.h.
enum ha_mode |
Enumerator | |
---|---|
HA_MODE_OFF | |
HA_MODE_FAIL_OVER | |
HA_MODE_FAIL_BACK | |
HA_MODE_LAZY_BACK | |
HA_MODE_ROLE_CHANGE | |
HA_MODE_REPLICA |
Definition at line 264 of file connection_defs.h.
enum ha_server_mode |
Enumerator | |
---|---|
HA_SERVER_MODE_ACTIVE | |
HA_SERVER_MODE_STANDBY | |
HA_SERVER_MODE_BACKUP | |
HA_SERVER_MODE_PRIMARY | |
HA_SERVER_MODE_SECONDARY | |
HA_SERVER_MODE_TERNARY |
Definition at line 288 of file connection_defs.h.