CUBRID Engine
latest
|
Go to the source code of this file.
Typedefs | |
typedef int(* | T_PROXY_EVENT_FUNC) (char *driver_info, char **buffer) |
typedef int(* | T_PROXY_EVENT_FUNC_EX) (char *driver_info, char **buffer, void *argv) |
typedef int(* T_PROXY_EVENT_FUNC) (char *driver_info, char **buffer) |
Definition at line 34 of file shard_proxy_handler.h.
typedef int(* T_PROXY_EVENT_FUNC_EX) (char *driver_info, char **buffer, void *argv) |
Definition at line 35 of file shard_proxy_handler.h.
T_CONTEXT_STMT* proxy_context_add_stmt | ( | T_PROXY_CONTEXT * | ctx_p, |
T_SHARD_STMT * | stmt_p | ||
) |
Definition at line 1372 of file shard_proxy_handler.c.
References error(), FREE_MEM, t_context_stmt::next, NULL, proxy_context_find_stmt(), PROXY_DEBUG_LOG, proxy_str_context(), shard_stmt_pin(), shard_str_stmt(), t_shard_stmt::stmt_h_id, t_context_stmt::stmt_h_id, and t_proxy_context::stmt_list.
Referenced by fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), fn_proxy_client_schema_info(), and proxy_client_execute_internal().
void proxy_context_clear_error | ( | T_PROXY_CONTEXT * | ctx_p | ) |
Definition at line 306 of file shard_proxy_handler.c.
References assert, CAS_NO_ERROR, t_proxy_context::error_code, t_proxy_context::error_ind, and t_proxy_context::error_msg.
Referenced by proxy_context_clear(), proxy_context_timeout(), proxy_handler_process_client_request(), and proxy_process_client_register().
T_PROXY_CONTEXT* proxy_context_find | ( | int | cid, |
unsigned int | uid | ||
) |
Definition at line 1314 of file shard_proxy_handler.c.
References t_proxy_context_global::ent, t_proxy_context::is_busy, NULL, and t_proxy_context::uid.
Referenced by proxy_context_find_by_socket_client_io(), proxy_context_free(), proxy_find_idle_cas_by_conn_info(), proxy_handler_process_cas_conn_error(), proxy_handler_process_cas_error(), proxy_handler_process_cas_response(), proxy_handler_process_client_conn_error(), proxy_handler_process_client_request(), proxy_handler_process_client_wakeup_by_shard(), proxy_handler_process_client_wakeup_by_statement(), proxy_process_cas_conn_error(), proxy_process_cas_response(), proxy_set_conn_info(), proxy_waiter_timeout(), proxy_wakeup_context_by_shard(), and shard_stmt_new_internal().
T_PROXY_CONTEXT* proxy_context_find_by_socket_client_io | ( | T_SOCKET_IO * | sock_io_p | ) |
Definition at line 1324 of file shard_proxy_handler.c.
References assert, t_socket_io::client_id, t_client_io::ctx_cid, t_client_io::ctx_uid, t_socket_io::fd, t_socket_io::id, NULL, proxy_client_io_find_by_fd(), proxy_client_io_free(), proxy_context_find(), PROXY_LOG, PROXY_LOG_MODE_ERROR, proxy_socket_io_delete(), and proxy_str_client_io().
Referenced by proxy_process_client_conn_error(), proxy_process_client_register(), proxy_process_client_request(), and proxy_socket_io_write_to_client().
T_CONTEXT_STMT* proxy_context_find_stmt | ( | T_PROXY_CONTEXT * | ctx_p, |
int | stmt_h_id | ||
) |
Definition at line 1354 of file shard_proxy_handler.c.
References t_context_stmt::next, NULL, t_context_stmt::stmt_h_id, and t_proxy_context::stmt_list.
Referenced by fn_proxy_client_prepare(), and proxy_context_add_stmt().
void proxy_context_free | ( | T_PROXY_CONTEXT * | ctx_p | ) |
Definition at line 1274 of file shard_proxy_handler.c.
References assert, ENTER_FUNC, error(), EXIT_FUNC, t_proxy_context_global::freeq, proxy_context_clear(), proxy_context_find(), proxy_context_free(), proxy_context_free_client(), proxy_context_free_shard(), PROXY_LOG, PROXY_LOG_MODE_ERROR, and shard_cqueue_enqueue().
Referenced by proxy_context_free(), proxy_handler_process_cas_conn_error(), proxy_handler_process_cas_response(), proxy_handler_process_client_conn_error(), proxy_handler_process_client_request(), proxy_process_cas_conn_error(), proxy_process_cas_response(), proxy_process_client_conn_error(), proxy_process_client_register(), proxy_process_client_request(), proxy_socket_io_write_to_client(), and proxy_wakeup_context_by_shard().
void proxy_context_free_stmt | ( | T_PROXY_CONTEXT * | ctx_p | ) |
Definition at line 1410 of file shard_proxy_handler.c.
References assert, FREE_MEM, t_context_stmt::next, NULL, t_shard_stmt::num_pinned, PROXY_DEBUG_LOG, proxy_str_context(), shard_stmt_find_by_stmt_h_id(), shard_stmt_free(), SHARD_STMT_STATUS_INVALID, SHARD_STMT_TYPE_PREPARED, shard_stmt_unpin(), shard_str_stmt(), t_shard_stmt::status, t_context_stmt::stmt_h_id, t_proxy_context::stmt_list, and t_shard_stmt::stmt_type.
Referenced by fn_proxy_client_con_close(), fn_proxy_client_end_tran(), proxy_context_clear(), and proxy_handler_process_cas_response().
T_PROXY_CONTEXT* proxy_context_new | ( | void | ) |
Definition at line 1198 of file shard_proxy_handler.c.
References assert, t_proxy_context_global::freeq, t_proxy_context::is_busy, t_proxy_context::is_in_tran, proxy_context_clear(), PROXY_LOG, PROXY_LOG_MODE_SHARD_DETAIL, proxy_str_context(), shard_cqueue_dequeue(), t_proxy_context::uid, t_proxy_context::wait_timeout, and t_proxy_info::wait_timeout.
Referenced by proxy_client_io_new().
int proxy_context_send_error | ( | T_PROXY_CONTEXT * | ctx_p | ) |
Definition at line 318 of file shard_proxy_handler.c.
References assert, CAS_NO_ERROR, t_proxy_context::client_id, ENTER_FUNC, error(), t_proxy_context::error_code, t_proxy_context::error_ind, t_proxy_context::error_msg, EXIT_FUNC, t_proxy_context::free_context, t_proxy_context::is_client_in_tran, NULL, t_proxy_info::num_proxy_error_processed, proxy_event_free(), PROXY_EVENT_FROM_CLIENT, PROXY_EVENT_IO_WRITE, proxy_event_new_with_error(), proxy_get_driver_info_by_ctx(), proxy_io_make_error_msg(), PROXY_LOG, PROXY_LOG_MODE_ERROR, proxy_send_response_to_client(), proxy_str_context(), proxy_str_event(), shard_shm_get_client_info(), and shard_shm_init_client_info_request().
Referenced by proxy_context_timeout(), proxy_handler_process_client_request(), and proxy_process_client_register().
void proxy_context_set_error | ( | T_PROXY_CONTEXT * | ctx_p, |
int | error_ind, | ||
int | error_code | ||
) |
Definition at line 281 of file shard_proxy_handler.c.
References assert, CAS_NO_ERROR, t_proxy_context::error_code, t_proxy_context::error_ind, and t_proxy_context::error_msg.
Referenced by fn_proxy_client_cursor(), fn_proxy_client_fetch(), fn_proxy_client_get_db_parameter(), fn_proxy_client_get_db_version(), fn_proxy_client_not_supported(), fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), fn_proxy_client_schema_info(), fn_proxy_client_set_db_parameter(), proxy_client_execute_internal(), proxy_context_set_error_with_msg(), and proxy_send_request_to_cas_with_new_event().
void proxy_context_set_error_with_msg | ( | T_PROXY_CONTEXT * | ctx_p, |
int | error_ind, | ||
int | error_code, | ||
const char * | error_msg | ||
) |
Definition at line 297 of file shard_proxy_handler.c.
References t_proxy_context::error_msg, and proxy_context_set_error().
Referenced by proxy_check_authorization(), proxy_client_io_new(), proxy_context_timeout(), and proxy_process_client_register().
void proxy_context_set_in_tran | ( | T_PROXY_CONTEXT * | ctx_p, |
int | shard_id, | ||
int | cas_id | ||
) |
Definition at line 1170 of file shard_proxy_handler.c.
References assert, t_proxy_context::cas_id, t_proxy_context::dont_free_statement, t_proxy_context::is_in_tran, and t_proxy_context::shard_id.
Referenced by fn_proxy_client_close_req_handle(), fn_proxy_client_cursor_close(), fn_proxy_client_fetch(), fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), proxy_client_execute_internal(), proxy_handler_process_client_wakeup_by_shard(), proxy_send_request_to_cas(), proxy_send_request_to_cas_with_new_event(), and proxy_wakeup_context_by_shard().
void proxy_context_set_out_tran | ( | T_PROXY_CONTEXT * | ctx_p | ) |
Definition at line 1185 of file shard_proxy_handler.c.
References assert, t_proxy_context::cas_id, t_proxy_context::is_in_tran, PROXY_INVALID_CAS, PROXY_INVALID_SHARD, and t_proxy_context::shard_id.
Referenced by proxy_handler_process_cas_conn_error(), and proxy_handler_process_cas_response().
void proxy_context_timeout | ( | T_PROXY_CONTEXT * | ctx_p | ) |
Definition at line 1447 of file shard_proxy_handler.c.
References assert, CAS_ER_INTERNAL, CAS_ERROR_INDICATOR, t_proxy_context::cas_id, t_proxy_context::func_code, HT_INVAL, t_proxy_context::is_in_tran, NULL, t_proxy_context::prepared_stmt, proxy_context_clear_error(), proxy_context_send_error(), proxy_context_set_error_with_msg(), proxy_event_free(), PROXY_INVALID_CAS, PROXY_INVALID_FUNC_CODE, PROXY_INVALID_SHARD, PROXY_LOG, PROXY_LOG_MODE_ERROR, proxy_str_context(), t_proxy_context::shard_id, shard_stmt_check_waiter_and_wakeup(), shard_stmt_free(), SHARD_STMT_INVALID_HANDLE_ID, SHARD_STMT_STATUS_IN_PROGRESS, t_shard_stmt::status, t_proxy_context::stmt_h_id, t_proxy_context::stmt_hint_type, t_proxy_context::wait_timeout, t_proxy_info::wait_timeout, t_proxy_context::waiting_dummy_prepare, and t_proxy_context::waiting_event.
Referenced by proxy_waiter_timeout().
int proxy_event_alloc_buffer | ( | T_PROXY_EVENT * | event_p, |
unsigned int | size | ||
) |
Definition at line 1808 of file shard_proxy_handler.c.
References assert, t_proxy_event::buffer, t_io_buffer::data, t_io_buffer::length, NULL, and t_io_buffer::offset.
Referenced by proxy_socket_io_read_from_cas_first(), and proxy_socket_io_read_from_client_first().
T_PROXY_EVENT* proxy_event_dup | ( | T_PROXY_EVENT * | event_p | ) |
Definition at line 1699 of file shard_proxy_handler.c.
References t_proxy_event::buffer, t_io_buffer::data, FREE_MEM, t_io_buffer::length, NULL, and t_io_buffer::offset.
Referenced by fn_proxy_client_check_cas(), fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), and proxy_client_execute_internal().
void proxy_event_free | ( | T_PROXY_EVENT * | event_p | ) |
Definition at line 1908 of file shard_proxy_handler.c.
References assert, t_proxy_event::buffer, FREE_MEM, and proxy_io_buffer_clear().
Referenced by fn_proxy_cas_check_cas(), fn_proxy_cas_end_tran(), fn_proxy_cas_fetch(), fn_proxy_cas_prepare(), fn_proxy_cas_prepare_and_execute(), fn_proxy_cas_relay_only(), fn_proxy_cas_schema_info(), fn_proxy_client_check_cas(), fn_proxy_client_close_req_handle(), fn_proxy_client_con_close(), fn_proxy_client_cursor(), fn_proxy_client_cursor_close(), fn_proxy_client_end_tran(), fn_proxy_client_fetch(), fn_proxy_client_get_db_parameter(), fn_proxy_client_get_db_version(), fn_proxy_client_not_supported(), fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), fn_proxy_client_schema_info(), fn_proxy_client_set_db_parameter(), fn_proxy_get_shard_info(), proxy_cas_execute_internal(), proxy_client_execute_internal(), proxy_context_clear(), proxy_context_send_error(), proxy_context_timeout(), proxy_event_new_with_error(), proxy_event_new_with_req(), proxy_event_new_with_rsp_ex(), proxy_handler_process_cas_conn_error(), proxy_handler_process_cas_error(), proxy_handler_process_cas_response(), proxy_handler_process_client_conn_error(), proxy_handler_process_client_request(), proxy_handler_process_client_wakeup_by_shard(), proxy_handler_process_client_wakeup_by_statement(), proxy_process_cas_conn_error(), proxy_process_cas_read_error(), proxy_process_cas_register(), proxy_process_cas_response(), proxy_process_cas_write_error(), proxy_process_client_conn_error(), proxy_process_client_read_error(), proxy_process_client_register(), proxy_process_client_request(), proxy_process_client_write_error(), proxy_send_prepared_stmt_to_client(), proxy_send_request_to_cas_with_new_event(), proxy_send_response_to_client_with_new_event(), proxy_socket_io_clear(), proxy_socket_io_new_client(), proxy_socket_io_write(), proxy_socket_io_write_internal(), proxy_socket_set_write_event(), and proxy_wakeup_context_by_shard().
bool proxy_event_io_read_complete | ( | T_PROXY_EVENT * | event_p | ) |
Definition at line 1888 of file shard_proxy_handler.c.
References assert, t_proxy_event::buffer, t_io_buffer::length, t_io_buffer::offset, PROXY_EVENT_IO_READ, PROXY_EVENT_IO_WRITE, and t_proxy_event::type.
Referenced by proxy_socket_io_read_from_cas_next(), and proxy_socket_io_read_from_client_next().
T_PROXY_EVENT* proxy_event_new | ( | unsigned int | type, |
int | from_cas | ||
) |
Definition at line 1677 of file shard_proxy_handler.c.
References t_proxy_event::buffer, t_proxy_event::cas_id, t_proxy_event::cid, t_proxy_event::from_cas, PROXY_INVALID_CAS, PROXY_INVALID_CONTEXT, PROXY_INVALID_SHARD, t_proxy_event::shard_id, t_proxy_event::type, and t_proxy_event::uid.
Referenced by proxy_client_execute_internal(), proxy_event_new_with_error(), proxy_event_new_with_req(), proxy_event_new_with_rsp_ex(), proxy_process_cas_conn_error(), proxy_process_client_conn_error(), proxy_send_prepared_stmt_to_client(), proxy_socket_io_read(), proxy_wakeup_context_by_shard(), and proxy_wakeup_context_by_statement().
T_PROXY_EVENT* proxy_event_new_with_error | ( | char * | driver_info, |
unsigned int | type, | ||
int | from, | ||
int(*)(char *driver_info, char **buffer, int error_ind, int error_code, const char *error_msg, char is_in_tran) | err_func, | ||
int | error_ind, | ||
int | error_code, | ||
const char * | error_msg, | ||
char | is_in_tran | ||
) |
Definition at line 1780 of file shard_proxy_handler.c.
References NULL, proxy_event_free(), proxy_event_new(), and proxy_event_set_buffer().
Referenced by fn_proxy_cas_prepare(), and proxy_context_send_error().
T_PROXY_EVENT* proxy_event_new_with_req | ( | char * | driver_info, |
unsigned int | type, | ||
int | from, | ||
T_PROXY_EVENT_FUNC | req_func | ||
) |
Definition at line 1723 of file shard_proxy_handler.c.
References NULL, proxy_event_free(), proxy_event_new(), and proxy_event_set_buffer().
Referenced by proxy_event_new_with_rsp(), and proxy_send_request_to_cas_with_new_event().
T_PROXY_EVENT* proxy_event_new_with_rsp | ( | char * | driver_info, |
unsigned int | type, | ||
int | from, | ||
T_PROXY_EVENT_FUNC | resp_func | ||
) |
Definition at line 1748 of file shard_proxy_handler.c.
References proxy_event_new_with_req().
Referenced by fn_proxy_cas_check_cas(), fn_proxy_client_check_cas(), fn_proxy_client_set_db_parameter(), proxy_process_client_register(), proxy_send_response_to_client_with_new_event(), and proxy_socket_io_new_client().
T_PROXY_EVENT* proxy_event_new_with_rsp_ex | ( | char * | driver_info, |
unsigned int | type, | ||
int | from, | ||
T_PROXY_EVENT_FUNC_EX | resp_func, | ||
void * | argv | ||
) |
Definition at line 1754 of file shard_proxy_handler.c.
References NULL, proxy_event_free(), proxy_event_new(), and proxy_event_set_buffer().
Referenced by fn_proxy_client_get_db_parameter().
int proxy_event_realloc_buffer | ( | T_PROXY_EVENT * | event_p, |
unsigned int | size | ||
) |
Definition at line 1820 of file shard_proxy_handler.c.
References assert, t_proxy_event::buffer, t_io_buffer::data, t_io_buffer::length, and NULL.
Referenced by proxy_socket_io_read_internal().
void proxy_event_set_buffer | ( | T_PROXY_EVENT * | event_p, |
char * | data, | ||
unsigned int | size | ||
) |
Definition at line 1843 of file shard_proxy_handler.c.
References assert, t_proxy_event::buffer, t_io_buffer::data, t_io_buffer::length, NULL, and t_io_buffer::offset.
Referenced by proxy_client_execute_internal(), proxy_event_new_with_error(), proxy_event_new_with_req(), proxy_event_new_with_rsp_ex(), and proxy_send_prepared_stmt_to_client().
void proxy_event_set_context | ( | T_PROXY_EVENT * | event_p, |
int | cid, | ||
unsigned int | uid | ||
) |
Definition at line 1865 of file shard_proxy_handler.c.
References assert, t_proxy_event::cid, and t_proxy_event::uid.
Referenced by proxy_process_cas_conn_error(), proxy_process_cas_response(), proxy_process_client_conn_error(), proxy_process_client_register(), proxy_process_client_request(), proxy_wakeup_context_by_shard(), and proxy_wakeup_context_by_statement().
void proxy_event_set_shard | ( | T_PROXY_EVENT * | event_p, |
int | shard_id, | ||
int | cas_id | ||
) |
Definition at line 1877 of file shard_proxy_handler.c.
References assert, t_proxy_event::cas_id, and t_proxy_event::shard_id.
Referenced by proxy_wakeup_context_by_shard().
void proxy_event_set_type_from | ( | T_PROXY_EVENT * | event_p, |
unsigned int | type, | ||
int | from_cas | ||
) |
Definition at line 1854 of file shard_proxy_handler.c.
References assert, t_proxy_event::from_cas, and t_proxy_event::type.
Referenced by proxy_process_cas_response(), and proxy_process_client_request().
void proxy_handler_destroy | ( | void | ) |
Definition at line 1498 of file shard_proxy_handler.c.
References t_proxy_handler::cas_rcv_q, t_proxy_handler::cli_rcv_q, t_proxy_handler::cli_ret_q, proxy_context_destroy(), and shard_queue_destroy().
Referenced by proxy_handler_initialize(), and proxy_term().
int proxy_handler_initialize | ( | void | ) |
Definition at line 1507 of file shard_proxy_handler.c.
References t_proxy_handler::cas_rcv_q, t_proxy_handler::cli_rcv_q, t_proxy_handler::cli_ret_q, error(), proxy_context_initialize(), proxy_handler_destroy(), and shard_queue_initialize().
Referenced by main().
bool proxy_handler_is_cas_in_tran | ( | int | shard_id, |
int | cas_id | ||
) |
Definition at line 256 of file shard_proxy_handler.c.
References as_info, assert, t_appl_server_info::cas_change_mode, CAS_CHANGE_MODE_KEEP, t_appl_server_info::con_status, CON_STATUS_IN_TRAN, NULL, t_appl_server_info::num_holdable_results, and shard_shm_get_as_info().
Referenced by fn_proxy_cas_fetch(), fn_proxy_cas_prepare_and_execute(), proxy_cas_execute_internal(), and proxy_handler_process_cas_response().
void proxy_handler_process | ( | void | ) |
Definition at line 1551 of file shard_proxy_handler.c.
References t_proxy_handler::cas_rcv_q, t_proxy_handler::cli_rcv_q, t_proxy_handler::cli_ret_q, NULL, proxy_Handler, proxy_handler_process_cas_event(), proxy_handler_process_client_event(), and shard_queue_dequeue().
Referenced by main().
char* proxy_str_context | ( | T_PROXY_CONTEXT * | ctx_p | ) |
Definition at line 1079 of file shard_proxy_handler.c.
References t_proxy_context::cas_id, t_proxy_context::cid, t_proxy_context::client_id, t_proxy_context::error_code, t_proxy_context::error_ind, t_proxy_context::error_msg, t_proxy_context::free_context, t_proxy_context::free_on_client_io_write, t_proxy_context::free_on_end_tran, t_proxy_context::func_code, t_proxy_context::is_busy, t_proxy_context::is_cas_in_tran, t_proxy_context::is_client_in_tran, t_proxy_context::is_in_tran, t_proxy_context::is_prepare_for_execute, NULL, proxy_str_event(), t_proxy_context::shard_id, t_proxy_context::stmt_h_id, t_proxy_context::stmt_hint_type, t_proxy_context::uid, t_proxy_context::wait_timeout, and t_proxy_context::waiting_event.
Referenced by fn_proxy_cas_check_cas(), fn_proxy_cas_end_tran(), fn_proxy_cas_fetch(), fn_proxy_cas_prepare(), fn_proxy_cas_prepare_and_execute(), fn_proxy_cas_relay_only(), fn_proxy_cas_schema_info(), fn_proxy_client_check_cas(), fn_proxy_client_close_req_handle(), fn_proxy_client_cursor(), fn_proxy_client_cursor_close(), fn_proxy_client_end_tran(), fn_proxy_client_get_db_parameter(), fn_proxy_client_get_db_version(), fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), fn_proxy_client_schema_info(), fn_proxy_client_set_db_parameter(), proxy_cas_execute_internal(), proxy_client_execute_internal(), proxy_context_add_stmt(), proxy_context_free_client(), proxy_context_free_stmt(), proxy_context_new(), proxy_context_send_error(), proxy_context_timeout(), proxy_handler_process_cas_conn_error(), proxy_handler_process_cas_response(), proxy_handler_process_client_request(), proxy_process_cas_conn_error(), proxy_process_cas_response(), proxy_process_client_conn_error(), proxy_process_client_register(), proxy_process_client_request(), proxy_send_prepared_stmt_to_client(), proxy_send_request_to_cas_with_new_event(), and proxy_send_response_to_client_with_new_event().
char* proxy_str_event | ( | T_PROXY_EVENT * | event_p | ) |
Definition at line 1919 of file shard_proxy_handler.c.
References t_proxy_event::cas_id, t_proxy_event::cid, t_proxy_event::from_cas, NULL, t_proxy_event::shard_id, t_proxy_event::type, and t_proxy_event::uid.
Referenced by fn_proxy_cas_check_cas(), fn_proxy_cas_end_tran(), fn_proxy_cas_fetch(), fn_proxy_cas_prepare(), fn_proxy_cas_prepare_and_execute(), fn_proxy_cas_relay_only(), fn_proxy_cas_schema_info(), fn_proxy_client_check_cas(), fn_proxy_client_cursor(), fn_proxy_client_end_tran(), fn_proxy_client_get_db_parameter(), fn_proxy_client_schema_info(), fn_proxy_client_set_db_parameter(), proxy_cas_execute_internal(), proxy_cas_io_write(), proxy_client_io_write(), proxy_context_send_error(), proxy_handler_process_cas_conn_error(), proxy_handler_process_cas_error(), proxy_handler_process_cas_response(), proxy_handler_process_client_conn_error(), proxy_handler_process_client_request(), proxy_process_cas_conn_error(), proxy_process_cas_response(), proxy_process_client_conn_error(), proxy_process_client_register(), proxy_process_client_request(), proxy_send_prepared_stmt_to_client(), proxy_send_request_to_cas(), proxy_send_request_to_cas_with_new_event(), proxy_send_response_to_client(), proxy_send_response_to_client_with_new_event(), proxy_socket_io_new_client(), and proxy_str_context().
void proxy_timer_process | ( | void | ) |
Definition at line 1935 of file shard_proxy_handler.c.
References NULL, proxy_available_cas_wait_timer(), PROXY_MAX_IGNORE_TIMER_CHECK, PROXY_TIMER_CHECK_INTERVAL, and shard_statement_wait_timer().
Referenced by main().
Definition at line 245 of file shard_proxy_handler.c.
References t_wait_context::expire_time.
Referenced by fn_proxy_client_prepare(), and proxy_client_add_waiter_by_shard().
void proxy_waiter_free | ( | T_WAIT_CONTEXT * | waiter | ) |
Definition at line 191 of file shard_proxy_handler.c.
References assert, and FREE_MEM.
Referenced by fn_proxy_client_prepare(), and proxy_waiter_timeout().
T_WAIT_CONTEXT* proxy_waiter_new | ( | int | ctx_cid, |
unsigned int | ctx_uid, | ||
int | timeout | ||
) |
Definition at line 169 of file shard_proxy_handler.c.
References t_wait_context::ctx_cid, t_wait_context::ctx_uid, t_wait_context::expire_time, and NULL.
Referenced by fn_proxy_client_prepare(), and proxy_client_add_waiter_by_shard().
void proxy_waiter_timeout | ( | T_SHARD_QUEUE * | waitq, |
INT64 * | counter, | ||
int | now | ||
) |
Definition at line 199 of file shard_proxy_handler.c.
References assert, t_wait_context::ctx_cid, t_wait_context::ctx_uid, t_wait_context::expire_time, NULL, proxy_context_find(), proxy_context_timeout(), PROXY_DEBUG_LOG, proxy_waiter_free(), shard_queue_dequeue(), and shard_queue_peek_value().
Referenced by proxy_available_cas_wait_timer(), and shard_statement_wait_timer().
int proxy_wakeup_context_by_shard | ( | T_WAIT_CONTEXT * | waiter_p, |
int | shard_id, | ||
int | cas_id | ||
) |
Definition at line 1580 of file shard_proxy_handler.c.
References assert, t_cas_io::cas_id, t_proxy_context::cid, t_proxy_handler::cli_ret_q, t_proxy_context::client_id, t_wait_context::ctx_cid, t_wait_context::ctx_uid, error(), t_proxy_context::func_code, NULL, proxy_cas_alloc_by_ctx(), proxy_context_find(), proxy_context_free(), proxy_context_set_in_tran(), PROXY_DEBUG_LOG, PROXY_EVENT_CLIENT_WAKEUP_BY_SHARD, proxy_event_free(), PROXY_EVENT_FROM_CLIENT, proxy_event_new(), proxy_event_set_context(), proxy_event_set_shard(), PROXY_LOG, PROXY_LOG_MODE_ERROR, t_cas_io::shard_id, shard_queue_enqueue(), SHARD_TEMPORARY_UNAVAILABLE, t_proxy_context::uid, and t_proxy_context::wait_timeout.
Referenced by proxy_client_check_waiter_and_wakeup().
int proxy_wakeup_context_by_statement | ( | T_WAIT_CONTEXT * | waiter_p | ) |
Definition at line 1650 of file shard_proxy_handler.c.
References assert, t_proxy_handler::cli_ret_q, t_wait_context::ctx_cid, t_wait_context::ctx_uid, error(), NULL, PROXY_DEBUG_LOG, PROXY_EVENT_CLIENT_WAKEUP_BY_STATEMENT, PROXY_EVENT_FROM_CLIENT, proxy_event_new(), proxy_event_set_context(), and shard_queue_enqueue().
Referenced by shard_stmt_check_waiter_and_wakeup().
char* shard_str_sqls | ( | char * | sql | ) |
Definition at line 1964 of file shard_proxy_handler.c.
Referenced by fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), and shard_str_stmt().