mirror of
https://gitee.com/wangbin579/cetus.git
synced 2024-12-02 03:47:41 +08:00
Add debug logs
This commit is contained in:
parent
79bfe5e428
commit
8de3c3a4f0
@ -900,6 +900,7 @@ static void
|
||||
network_mysqld_admin_plugin_stop_listening(chassis *chas,
|
||||
chassis_plugin_config *config)
|
||||
{
|
||||
g_message("%s:call network_mysqld_admin_plugin_stop_listening", G_STRLOC);
|
||||
if (config->listen_con) {
|
||||
g_message("%s:close listen socket", G_STRLOC);
|
||||
network_socket_free(config->listen_con->server);
|
||||
|
@ -2697,6 +2697,7 @@ static void
|
||||
network_mysqld_proxy_plugin_stop_listening(chassis *chas,
|
||||
chassis_plugin_config *config)
|
||||
{
|
||||
g_message("%s:call network_mysqld_proxy_plugin_stop_listening", G_STRLOC);
|
||||
if (config->listen_con) {
|
||||
g_message("%s:close listen socket", G_STRLOC);
|
||||
network_socket_free(config->listen_con->server);
|
||||
|
@ -2629,6 +2629,7 @@ static void
|
||||
network_mysqld_shard_plugin_stop_listening(chassis *chas,
|
||||
chassis_plugin_config *config)
|
||||
{
|
||||
g_message("%s:call network_mysqld_shard_plugin_stop_listening", G_STRLOC);
|
||||
if (config->listen_con) {
|
||||
g_message("%s:close listen socket", G_STRLOC);
|
||||
network_socket_free(config->listen_con->server);
|
||||
|
@ -211,6 +211,8 @@ cetus_master_process_cycle(cetus_cycle_t *cycle)
|
||||
chassis_plugin *p = cycle->modules->pdata[i];
|
||||
p->stop_listening(cycle, p->config);
|
||||
}
|
||||
|
||||
cetus_signal_worker_processes(cycle, cetus_signal_value(CETUS_NOACCEPT_SIGNAL));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -603,13 +605,14 @@ cetus_worker_process_cycle(cetus_cycle_t *cycle, void *data)
|
||||
/* call main procedures for worker */
|
||||
chassis_event_loop_t *loop = cycle->event_base;
|
||||
chassis_event_loop(loop);
|
||||
g_debug("%s: after chassis_event_loop", G_STRLOC);
|
||||
g_message("%s: after chassis_event_loop", G_STRLOC);
|
||||
|
||||
if (cetus_terminate) {
|
||||
g_message("%s: exiting", G_STRLOC);
|
||||
cetus_worker_process_exit(cycle);
|
||||
}
|
||||
|
||||
g_message("%s: check cetus_noaccept", G_STRLOC);
|
||||
if (cetus_noaccept) {
|
||||
g_message("%s: cetus_noaccept is set true", G_STRLOC);
|
||||
cetus_noaccept = 0;
|
||||
|
@ -105,6 +105,9 @@ chassis_event_loop(chassis_event_loop_t *loop)
|
||||
g_message("%s: cetus_quit is true", G_STRLOC);
|
||||
}
|
||||
|
||||
if (cetus_noaccept) {
|
||||
g_message("%s: cetus_noaccept is true", G_STRLOC);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ network_socket_free(network_socket *s)
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
g_debug("%s: network_socket_free:%p", G_STRLOC, s);
|
||||
g_message("%s: network_socket_free:%p", G_STRLOC, s);
|
||||
|
||||
if (s->last_compressed_packet) {
|
||||
g_string_free(s->last_compressed_packet, TRUE);
|
||||
@ -167,6 +167,7 @@ network_socket_free(network_socket *s)
|
||||
#ifdef HAVE_OPENSSL
|
||||
network_ssl_free_connection(s);
|
||||
#endif
|
||||
g_message("%s: s->fd:%d", G_STRLOC, s->fd);
|
||||
if (s->fd != -1) {
|
||||
closesocket(s->fd);
|
||||
}
|
||||
|
@ -145,6 +145,7 @@ gboolean network_ssl_init(char* conf_dir)
|
||||
{
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100003L
|
||||
|
||||
g_message("%s: OPENSSL_VERSION_NUMBER:%d", G_STRLOC, OPENSSL_VERSION_NUMBER);
|
||||
if (OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL) == 0) {
|
||||
g_critical(G_STRLOC " OPENSSL_init_ssl() failed");
|
||||
return FALSE;
|
||||
@ -159,6 +160,7 @@ gboolean network_ssl_init(char* conf_dir)
|
||||
|
||||
#else
|
||||
|
||||
g_message("%s: call old ssl fun", G_STRLOC);
|
||||
OPENSSL_config(NULL);
|
||||
|
||||
SSL_library_init();
|
||||
|
Loading…
Reference in New Issue
Block a user