mirror of
https://gitee.com/wangbin579/cetus.git
synced 2024-11-29 10:27:36 +08:00
Add max connection info while waiting one backend connection failed
This commit is contained in:
parent
1f8a3a5243
commit
452e00d2df
@ -355,20 +355,21 @@ network_read_sql_resp(int G_GNUC_UNUSED fd, short events, void *user_data)
|
||||
packet.data = chunk->data;
|
||||
packet.offset = 0;
|
||||
|
||||
int is_finished = network_mysqld_proto_get_query_result(&packet, con);
|
||||
int is_finished =
|
||||
network_mysqld_proto_get_query_result(&packet, con);
|
||||
if (is_finished == 1) {
|
||||
g_debug("%s: read finished", G_STRLOC);
|
||||
break;
|
||||
g_debug("%s: read finished", G_STRLOC);
|
||||
break;
|
||||
}
|
||||
|
||||
ret = network_mysqld_con_get_packet(con->srv, sock);
|
||||
}
|
||||
}
|
||||
|
||||
if (con->servers == NULL) {
|
||||
if (con->servers == NULL) {
|
||||
con->servers = g_ptr_array_new();
|
||||
}
|
||||
}
|
||||
|
||||
g_ptr_array_add(con->servers, sock);
|
||||
g_ptr_array_add(con->servers, sock);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -2585,12 +2585,14 @@ handle_read_query(network_mysqld_con *con, network_mysqld_con_state_t ostate)
|
||||
}
|
||||
/* fall through */
|
||||
default:
|
||||
g_critical("%s: wait failed and no server backend for user:%s, ret:%d",
|
||||
G_STRLOC, con->client->response->username->str, ret);
|
||||
g_critical("%s: wait failed and no server backend for user:%s, ret:%d, "
|
||||
"max conn:%d",
|
||||
G_STRLOC, con->client->response->username->str, ret,
|
||||
con->srv->max_idle_connections);
|
||||
|
||||
handle_query_wait_stats(con);
|
||||
process_service_unavailable(con);
|
||||
break;
|
||||
handle_query_wait_stats(con);
|
||||
process_service_unavailable(con);
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user