CUBRID Engine  latest
shard_shm.h File Reference
#include "config.h"
#include "broker_config.h"
#include "broker_shm.h"
#include "shard_proxy_common.h"
Include dependency graph for shard_shm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

T_PROXY_INFOshard_shm_find_proxy_info (T_SHM_PROXY *proxy_p, int proxy_id)
 
T_SHARD_INFOshard_shm_find_shard_info (T_PROXY_INFO *proxy_info_p, int shard_id)
 
T_CLIENT_INFOshard_shm_get_client_info (T_PROXY_INFO *proxy_info_p, int idx)
 
T_APPL_SERVER_INFOshard_shm_get_as_info (T_PROXY_INFO *proxy_info_p, T_SHM_APPL_SERVER *shm_as_p, int shard_id, int as_id)
 
bool shard_shm_set_as_client_info (T_PROXY_INFO *proxy_info_p, T_SHM_APPL_SERVER *shm_as_p, int shard_id, int as_id, unsigned int ip_addr, char *driver_info, char *driver_version)
 
bool shard_shm_set_as_client_info_with_db_param (T_PROXY_INFO *proxy_info_p, T_SHM_APPL_SERVER *shm_as_p, int shard_id, int as_id, T_CLIENT_INFO *client_info_p)
 
T_SHM_SHARD_CONN_STATshard_shm_get_shard_stat (T_PROXY_INFO *proxy_info_p, int idx)
 
T_SHM_SHARD_KEY_STATshard_shm_get_key_stat (T_PROXY_INFO *proxy_info_p, int idx)
 
T_SHM_PROXYshard_shm_initialize_shm_proxy (T_BROKER_INFO *br_info)
 
void shard_shm_dump_appl_server_internal (FILE *fp, T_SHM_PROXY *shm_as_p)
 
void shard_shm_dump_appl_server (FILE *fp, int shmid)
 
void shard_shm_init_client_info (T_CLIENT_INFO *client_info_p)
 
void shard_shm_init_client_info_request (T_CLIENT_INFO *client_info_p)
 
void shard_shm_set_client_info_request (T_CLIENT_INFO *client_info_p, int func_code)
 
void shard_shm_set_client_info_response (T_CLIENT_INFO *client_info_p)
 

Function Documentation

void shard_shm_dump_appl_server ( FILE *  fp,
int  shmid 
)

Definition at line 651 of file shard_shm.c.

References NULL, SHARD_ERR, shard_shm_dump_appl_server_internal(), SHM_MODE_MONITOR, SHM_PROXY, uw_shm_detach(), and uw_shm_open().

Referenced by broker_config_dump().

Here is the caller graph for this function:

void shard_shm_dump_appl_server_internal ( FILE *  fp,
T_SHM_PROXY shm_as_p 
)

Definition at line 641 of file shard_shm.c.

References assert, and shard_shm_dump_proxy().

Referenced by shard_shm_dump_appl_server().

Here is the caller graph for this function:

T_APPL_SERVER_INFO* shard_shm_get_as_info ( T_PROXY_INFO proxy_info_p,
T_SHM_APPL_SERVER shm_as_p,
int  shard_id,
int  as_id 
)
T_SHM_SHARD_KEY_STAT* shard_shm_get_key_stat ( T_PROXY_INFO proxy_info_p,
int  idx 
)

Definition at line 478 of file shard_shm.c.

References assert, t_proxy_info::key_stat, and NULL.

Referenced by metadata_monitor(), and proxy_update_shard_stats().

Here is the caller graph for this function:

T_SHM_SHARD_CONN_STAT* shard_shm_get_shard_stat ( T_PROXY_INFO proxy_info_p,
int  idx 
)

Definition at line 463 of file shard_shm.c.

References assert, NULL, and t_proxy_info::shard_stat.

Referenced by metadata_monitor(), proxy_update_shard_stats(), and proxy_update_shard_stats_without_hint().

Here is the caller graph for this function:

void shard_shm_init_client_info_request ( T_CLIENT_INFO client_info_p)

Definition at line 773 of file shard_shm.c.

References assert, t_client_info::func_code, t_client_info::req_time, and t_client_info::res_time.

Referenced by proxy_context_send_error(), and proxy_handler_process_client_request().

Here is the caller graph for this function:

T_SHM_PROXY* shard_shm_initialize_shm_proxy ( T_BROKER_INFO br_info)

Definition at line 261 of file shard_shm.c.

References t_broker_info::appl_server, t_proxy_info::appl_server, t_broker_info::appl_server_max_num, t_broker_info::appl_server_min_num, t_broker_info::appl_server_num, t_broker_info::appl_server_shm_id, t_proxy_info::appl_server_shm_id, t_shard_info::as_info_index_base, t_proxy_info::client_info, t_proxy_info::cur_client, i, t_broker_info::ignore_shard_hint, t_proxy_info::ignore_shard_hint, t_proxy_info::key_stat, t_shard_info::max_appl_server, t_broker_info::max_client, t_proxy_info::max_client, t_shm_proxy::max_client, t_proxy_info::max_context, t_shm_proxy::max_context, t_proxy_info::max_prepared_stmt_count, t_proxy_info::max_shard, t_shard_info::min_appl_server, NULL, t_shard_info::num_appl_server, t_broker_info::num_proxy, t_shm_proxy::num_proxy, t_shm_shard_conn::num_shard_conn, t_proxy_info::num_shard_conn, t_shm_shard_key::num_shard_key, t_proxy_info::num_shard_key, t_proxy_info::pid, t_proxy_info::proxy_access_log_reset, t_proxy_info::proxy_id, proxy_info_p, t_proxy_info::proxy_log_reset, t_broker_info::proxy_max_prepared_stmt_count, t_broker_info::proxy_shm_id, PROXY_STATUS_START, t_broker_info::proxy_timeout, t_proxy_info::service_flag, SERVICE_ON, t_shm_shard_conn::shard_conn, t_shard_conn::shard_id, t_shard_info::shard_id, t_proxy_info::shard_info, t_shm_shard_key::shard_key, shard_metadata_get_conn(), shard_metadata_get_key(), shard_metadata_initialize(), shard_shm_find_proxy_info(), shard_shm_get_max_context(), shard_shm_init_client_info(), shard_shm_init_key_stat(), shard_shm_init_shard_stat(), shard_shm_set_shm_proxy(), t_proxy_info::shard_stat, shm_conn_p, shm_key_p, SHM_PROXY, shm_proxy_p, t_shm_proxy::shm_shard_conn, t_shm_proxy::shm_shard_key, t_proxy_info::status, uw_shm_create(), uw_shm_destroy(), and t_proxy_info::wait_timeout.

Referenced by admin_on_cmd(), and admin_start_cmd().

Here is the caller graph for this function:

bool shard_shm_set_as_client_info ( T_PROXY_INFO proxy_info_p,
T_SHM_APPL_SERVER shm_as_p,
int  shard_id,
int  as_id,
unsigned int  ip_addr,
char *  driver_info,
char *  driver_version 
)
void shard_shm_set_client_info_request ( T_CLIENT_INFO client_info_p,
int  func_code 
)

Definition at line 783 of file shard_shm.c.

References assert, t_client_info::func_code, NULL, t_client_info::req_time, and t_client_info::res_time.

Referenced by proxy_handler_process_client_request().

Here is the caller graph for this function:

void shard_shm_set_client_info_response ( T_CLIENT_INFO client_info_p)

Definition at line 793 of file shard_shm.c.

References assert, NULL, and t_client_info::res_time.

Referenced by proxy_handler_process_cas_response().

Here is the caller graph for this function: