Surrounded every log writing command with LOGIF macro, which tests if the given logfile id matches with those enabled. The comparison is done against local variable and expensive function call is avoided.
This commit is contained in:
@ -41,6 +41,8 @@
|
||||
#include <secrets.h>
|
||||
#include <dcb.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
static void monitorMain(void *);
|
||||
|
||||
static char *version_str = "V1.0.0";
|
||||
@ -72,8 +74,10 @@ version()
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
skygw_log_write( LOGFILE_MESSAGE, "Initialise the MySQL Galera Monitor module %s.\n",
|
||||
version_str);
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"Initialise the MySQL Galera Monitor module %s.\n",
|
||||
version_str)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -334,10 +338,11 @@ MONITOR_SERVERS *ptr;
|
||||
|
||||
if (mysql_thread_init())
|
||||
{
|
||||
skygw_log_write_flush(LOGFILE_ERROR,
|
||||
"Fatal : mysql_thread_init failed in monitor "
|
||||
"module. Exiting.\n");
|
||||
return;
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Fatal : mysql_thread_init failed in monitor "
|
||||
"module. Exiting.\n")));
|
||||
return;
|
||||
}
|
||||
handle->status = MONITOR_RUNNING;
|
||||
while (1)
|
||||
|
||||
@ -45,6 +45,8 @@
|
||||
#include <secrets.h>
|
||||
#include <dcb.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
static void monitorMain(void *);
|
||||
|
||||
static char *version_str = "V1.0.0";
|
||||
@ -76,10 +78,10 @@ version()
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"Initialise the MySQL Monitor module %s.",
|
||||
version_str);
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"Initialise the MySQL Monitor module %s.",
|
||||
version_str)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -384,9 +386,10 @@ MONITOR_SERVERS *ptr;
|
||||
|
||||
if (mysql_thread_init())
|
||||
{
|
||||
skygw_log_write_flush(LOGFILE_ERROR,
|
||||
"Fatal : mysql_thread_init failed in monitor "
|
||||
"module. Exiting.\n");
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Fatal : mysql_thread_init failed in monitor "
|
||||
"module. Exiting.\n")));
|
||||
return;
|
||||
}
|
||||
handle->status = MONITOR_RUNNING;
|
||||
|
||||
@ -44,6 +44,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
static char *version_str = "V2.0.0";
|
||||
static int gw_create_backend_connection(DCB *backend, SERVER *server, SESSION *in_session);
|
||||
static int gw_read_backend_event(DCB* dcb);
|
||||
@ -119,12 +121,12 @@ static MYSQL_session* gw_get_shared_session_auth_info(
|
||||
if (dcb->session->state != SESSION_STATE_ALLOC) {
|
||||
auth_info = dcb->session->data;
|
||||
} else {
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"%lu [gw_get_shared_session_auth_info] Couldn't get "
|
||||
"session authentication info. Session in a wrong state %d.",
|
||||
pthread_self(),
|
||||
dcb->session->state);
|
||||
dcb->session->state)));
|
||||
}
|
||||
spinlock_release(&dcb->session->ses_lock);
|
||||
|
||||
@ -152,7 +154,7 @@ static int gw_read_backend_event(DCB *dcb) {
|
||||
backend_protocol = (MySQLProtocol *) dcb->protocol;
|
||||
CHK_PROTOCOL(backend_protocol);
|
||||
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_backend_event] Read dcb %p fd %d protocol "
|
||||
"state %d, %s.",
|
||||
@ -160,7 +162,7 @@ static int gw_read_backend_event(DCB *dcb) {
|
||||
dcb,
|
||||
dcb->fd,
|
||||
backend_protocol->state,
|
||||
STRPROTOCOLSTATE(backend_protocol->state));
|
||||
STRPROTOCOLSTATE(backend_protocol->state))));
|
||||
|
||||
|
||||
/* backend is connected:
|
||||
@ -242,17 +244,17 @@ static int gw_read_backend_event(DCB *dcb) {
|
||||
case -1:
|
||||
backend_protocol->state = MYSQL_AUTH_FAILED;
|
||||
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : backend server didn't "
|
||||
"accept authentication for user "
|
||||
"%s.",
|
||||
current_session->user);
|
||||
current_session->user)));
|
||||
break;
|
||||
case 1:
|
||||
backend_protocol->state = MYSQL_IDLE;
|
||||
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_backend_event] "
|
||||
"gw_receive_backend_auth succeed. "
|
||||
@ -260,11 +262,11 @@ static int gw_read_backend_event(DCB *dcb) {
|
||||
pthread_self(),
|
||||
dcb,
|
||||
dcb->fd,
|
||||
current_session->user);
|
||||
current_session->user)));
|
||||
break;
|
||||
default:
|
||||
ss_dassert(receive_rc == 0);
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_backend_event] "
|
||||
"gw_receive_backend_auth read "
|
||||
@ -273,7 +275,7 @@ static int gw_read_backend_event(DCB *dcb) {
|
||||
pthread_self(),
|
||||
dcb,
|
||||
dcb->fd,
|
||||
current_session->user);
|
||||
current_session->user)));
|
||||
rc = 0;
|
||||
goto return_with_lock;
|
||||
break;
|
||||
@ -305,12 +307,12 @@ static int gw_read_backend_event(DCB *dcb) {
|
||||
**/
|
||||
ss_dassert(rsession != NULL);
|
||||
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_backend_event] "
|
||||
"Call closeSession for backend's "
|
||||
"router client session.",
|
||||
pthread_self());
|
||||
pthread_self())));
|
||||
/* close router_session */
|
||||
router->closeSession(router_instance, rsession);
|
||||
rc = 1;
|
||||
@ -319,14 +321,14 @@ static int gw_read_backend_event(DCB *dcb) {
|
||||
else
|
||||
{
|
||||
ss_dassert(backend_protocol->state == MYSQL_IDLE);
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_backend_event] "
|
||||
"gw_receive_backend_auth succeed. Fd %d, "
|
||||
"user %s.",
|
||||
pthread_self(),
|
||||
dcb->fd,
|
||||
current_session->user);
|
||||
current_session->user)));
|
||||
|
||||
/* check the delay queue and flush the data */
|
||||
if (dcb->delayq)
|
||||
@ -435,7 +437,7 @@ static int gw_write_backend_event(DCB *dcb) {
|
||||
0,
|
||||
"Writing to backend failed due invalid Maxscale "
|
||||
"state.");
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_write_backend_event] Write to backend "
|
||||
"dcb %p fd %d "
|
||||
@ -443,23 +445,23 @@ static int gw_write_backend_event(DCB *dcb) {
|
||||
pthread_self(),
|
||||
dcb,
|
||||
dcb->fd,
|
||||
STRDCBSTATE(dcb->state));
|
||||
STRDCBSTATE(dcb->state))));
|
||||
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Attempt to write buffered data to backend "
|
||||
"failed "
|
||||
"due internal inconsistent state.");
|
||||
"due internal inconsistent state.")));
|
||||
|
||||
rc = 0;
|
||||
} else {
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_write_backend_event] Dcb %p in state %s "
|
||||
"but there's nothing to write either.",
|
||||
pthread_self(),
|
||||
dcb,
|
||||
STRDCBSTATE(dcb->state));
|
||||
STRDCBSTATE(dcb->state))));
|
||||
rc = 1;
|
||||
}
|
||||
goto return_rc;
|
||||
@ -473,14 +475,14 @@ static int gw_write_backend_event(DCB *dcb) {
|
||||
dcb_drain_writeq(dcb);
|
||||
rc = 1;
|
||||
return_rc:
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_write_backend_event] "
|
||||
"wrote to dcb %p fd %d, return %d",
|
||||
pthread_self(),
|
||||
dcb,
|
||||
dcb->fd,
|
||||
rc);
|
||||
rc)));
|
||||
|
||||
return rc;
|
||||
}
|
||||
@ -507,14 +509,14 @@ gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue)
|
||||
/** Free buffer memory */
|
||||
gwbuf_consume(queue, GWBUF_LENGTH(queue));
|
||||
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_MySQLWrite_backend] Write to backend failed. "
|
||||
"Backend dcb %p fd %d is %s.",
|
||||
pthread_self(),
|
||||
dcb,
|
||||
dcb->fd,
|
||||
STRDCBSTATE(dcb->state));
|
||||
STRDCBSTATE(dcb->state))));
|
||||
|
||||
spinlock_release(&dcb->authlock);
|
||||
return 0;
|
||||
@ -525,14 +527,14 @@ gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue)
|
||||
* connected with auth ok
|
||||
*/
|
||||
if (backend_protocol->state != MYSQL_IDLE) {
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_MySQLWrite_backend] dcb %p fd %d protocol "
|
||||
"state %s.",
|
||||
pthread_self(),
|
||||
dcb,
|
||||
dcb->fd,
|
||||
STRPROTOCOLSTATE(backend_protocol->state));
|
||||
STRPROTOCOLSTATE(backend_protocol->state))));
|
||||
|
||||
backend_set_delayqueue(dcb, queue);
|
||||
spinlock_release(&dcb->authlock);
|
||||
@ -589,24 +591,24 @@ static int gw_error_backend_event(DCB *dcb) {
|
||||
"Closed backend connection.");
|
||||
rc = 1;
|
||||
}
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"%lu [gw_error_backend_event] Some error occurred in backend. "
|
||||
"rc = %d",
|
||||
pthread_self(),
|
||||
rc);
|
||||
rc)));
|
||||
rsession = session->router_session;
|
||||
ss_dassert(rsession != NULL);
|
||||
/**
|
||||
* vraa : errorHandle
|
||||
* rsession should never be NULL here.
|
||||
*/
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_error_backend_event] "
|
||||
"Call closeSession for backend "
|
||||
"session.",
|
||||
pthread_self());
|
||||
pthread_self())));
|
||||
|
||||
router->closeSession(router_instance, rsession);
|
||||
|
||||
@ -640,15 +642,15 @@ static int gw_create_backend_connection(
|
||||
ss_dassert(protocol != NULL);
|
||||
|
||||
if (protocol == NULL) {
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_create_backend_connection] Failed to create "
|
||||
"protocol object for backend connection.",
|
||||
pthread_self());
|
||||
skygw_log_write_flush(
|
||||
pthread_self())));
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error: Failed to create "
|
||||
"protocol object for backend connection.");
|
||||
"protocol object for backend connection.")));
|
||||
goto return_fd;
|
||||
}
|
||||
|
||||
@ -663,7 +665,7 @@ static int gw_create_backend_connection(
|
||||
ss_dassert(fd > 0);
|
||||
protocol->fd = fd;
|
||||
protocol->state = MYSQL_CONNECTED;
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_create_backend_connection] Established "
|
||||
"connection to %s:%i, protocol fd %d client "
|
||||
@ -672,14 +674,14 @@ static int gw_create_backend_connection(
|
||||
server->name,
|
||||
server->port,
|
||||
protocol->fd,
|
||||
session->client->fd);
|
||||
session->client->fd)));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
ss_dassert(fd > 0);
|
||||
protocol->state = MYSQL_PENDING_CONNECT;
|
||||
protocol->fd = fd;
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_create_backend_connection] Connection "
|
||||
"pending to %s:%i, protocol fd %d client fd %d.",
|
||||
@ -687,13 +689,13 @@ static int gw_create_backend_connection(
|
||||
server->name,
|
||||
server->port,
|
||||
protocol->fd,
|
||||
session->client->fd);
|
||||
session->client->fd)));
|
||||
break;
|
||||
|
||||
default:
|
||||
ss_dassert(fd == -1);
|
||||
ss_dassert(protocol->state == MYSQL_ALLOC);
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_create_backend_connection] Connection "
|
||||
"failed to %s:%i, protocol fd %d client fd %d.",
|
||||
@ -701,7 +703,7 @@ static int gw_create_backend_connection(
|
||||
server->name,
|
||||
server->port,
|
||||
protocol->fd,
|
||||
session->client->fd);
|
||||
session->client->fd)));
|
||||
break;
|
||||
} /**< switch */
|
||||
|
||||
@ -790,11 +792,11 @@ static int backend_write_delayqueue(DCB *dcb)
|
||||
|
||||
if (rc == 0) {
|
||||
/** vraa : errorHandle */
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"%lu [backend_write_delayqueue] Some error occurred in "
|
||||
"backend.",
|
||||
pthread_self());
|
||||
pthread_self())));
|
||||
|
||||
mysql_send_custom_error(
|
||||
dcb->session->client,
|
||||
|
||||
@ -33,6 +33,8 @@
|
||||
#include <log_manager.h>
|
||||
#include <mysql_client_server_protocol.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
static char *version_str = "V1.0.0";
|
||||
|
||||
static int gw_MySQLAccept(DCB *listener);
|
||||
@ -462,7 +464,7 @@ int gw_read_client_event(DCB* dcb) {
|
||||
int eno = errno;
|
||||
errno = 0;
|
||||
|
||||
skygw_log_write(
|
||||
LOGIF(LE, (skygw_log_write(
|
||||
LOGFILE_ERROR,
|
||||
"%lu [gw_read_client_event] ioctl FIONREAD for fd "
|
||||
"%d failed. errno %d, %s. dcb->state = %d",
|
||||
@ -470,7 +472,7 @@ int gw_read_client_event(DCB* dcb) {
|
||||
dcb->fd,
|
||||
eno,
|
||||
strerror(eno),
|
||||
dcb->state);
|
||||
dcb->state)));
|
||||
rc = 1;
|
||||
goto return_rc;
|
||||
}
|
||||
@ -605,13 +607,13 @@ int gw_read_client_event(DCB* dcb) {
|
||||
if(rsession == NULL) {
|
||||
/** COM_QUIT */
|
||||
if (mysql_command == '\x01') {
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_client_event] Client read "
|
||||
"COM_QUIT and rsession == NULL. Closing "
|
||||
"client dcb %p.",
|
||||
pthread_self(),
|
||||
dcb);
|
||||
dcb)));
|
||||
(dcb->func).close(dcb);
|
||||
} else {
|
||||
/* Send a custom error as MySQL command reply */
|
||||
@ -631,12 +633,12 @@ int gw_read_client_event(DCB* dcb) {
|
||||
/** Route COM_QUIT to backend */
|
||||
if (mysql_command == '\x01') {
|
||||
router->routeQuery(router_instance, rsession, queue);
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_client_event] Routed COM_QUIT to "
|
||||
"backend. Close client dcb %p",
|
||||
pthread_self(),
|
||||
dcb);
|
||||
dcb)));
|
||||
|
||||
/** close client connection */
|
||||
(dcb->func).close(dcb);
|
||||
@ -929,22 +931,22 @@ int gw_MySQLAccept(DCB *listener)
|
||||
* Exceeded system's (ENFILE) or processes
|
||||
* (EMFILE) max. number of files limit.
|
||||
*/
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_MySQLAccept] Error %d, %s. ",
|
||||
pthread_self(),
|
||||
eno,
|
||||
strerror(eno));
|
||||
strerror(eno))));
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error %d, %s. "
|
||||
"Failed to accept new client "
|
||||
"connection.",
|
||||
eno,
|
||||
strerror(eno));
|
||||
strerror(eno))));
|
||||
}
|
||||
i++;
|
||||
usleep(100*i*i);
|
||||
@ -960,18 +962,18 @@ int gw_MySQLAccept(DCB *listener)
|
||||
/**
|
||||
* Other error.
|
||||
*/
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_MySQLAccept] Error %d, %s.",
|
||||
pthread_self(),
|
||||
eno,
|
||||
strerror(eno));
|
||||
skygw_log_write_flush(
|
||||
strerror(eno))));
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error %d, %s."
|
||||
"Failed to accept new client connection.",
|
||||
eno,
|
||||
strerror(eno));
|
||||
strerror(eno))));
|
||||
rc = 1;
|
||||
goto return_rc;
|
||||
} /* if (eno == ..) */
|
||||
@ -981,11 +983,11 @@ int gw_MySQLAccept(DCB *listener)
|
||||
|
||||
listener->stats.n_accepts++;
|
||||
#if defined(SS_DEBUG)
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_MySQLAccept] Accepted fd %d.",
|
||||
pthread_self(),
|
||||
c_sock);
|
||||
c_sock)));
|
||||
conn_open[c_sock] = true;
|
||||
#endif
|
||||
/* set nonblocking */
|
||||
@ -1003,11 +1005,11 @@ int gw_MySQLAccept(DCB *listener)
|
||||
if (protocol == NULL) {
|
||||
/** delete client_dcb */
|
||||
dcb_close(client_dcb);
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"%lu [gw_MySQLAccept] Failed to create "
|
||||
"protocol object for client connection.",
|
||||
pthread_self());
|
||||
pthread_self())));
|
||||
rc = 1;
|
||||
goto return_rc;
|
||||
}
|
||||
@ -1038,25 +1040,25 @@ int gw_MySQLAccept(DCB *listener)
|
||||
dcb_close(client_dcb);
|
||||
|
||||
/** Previous state is recovered in poll_add_dcb. */
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"%lu [gw_MySQLAccept] Failed to add dcb %p for "
|
||||
"fd %d to epoll set.",
|
||||
pthread_self(),
|
||||
client_dcb,
|
||||
client_dcb->fd);
|
||||
client_dcb->fd)));
|
||||
rc = 1;
|
||||
goto return_rc;
|
||||
}
|
||||
else
|
||||
{
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_MySQLAccept] Added dcb %p for fd "
|
||||
"%d to epoll set.",
|
||||
pthread_self(),
|
||||
client_dcb,
|
||||
client_dcb->fd);
|
||||
client_dcb->fd)));
|
||||
}
|
||||
} /**< while 1 */
|
||||
#if defined(SS_DEBUG)
|
||||
|
||||
@ -33,6 +33,8 @@
|
||||
#include <skygw_utils.h>
|
||||
#include <log_manager.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
extern int gw_read_backend_event(DCB* dcb);
|
||||
extern int gw_write_backend_event(DCB *dcb);
|
||||
extern int gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue);
|
||||
@ -64,13 +66,13 @@ MySQLProtocol* mysql_protocol_init(
|
||||
if (p == NULL) {
|
||||
int eno = errno;
|
||||
errno = 0;
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"%lu [mysql_init_protocol] MySQL protocol init failed : "
|
||||
"memory allocation due error %d, %s.",
|
||||
pthread_self(),
|
||||
eno,
|
||||
strerror(eno));
|
||||
strerror(eno))));
|
||||
goto return_p;
|
||||
}
|
||||
p->state = MYSQL_ALLOC;
|
||||
@ -326,7 +328,7 @@ int gw_receive_backend_auth(
|
||||
uint8_t* tmpbuf =
|
||||
(uint8_t *)calloc(1, GWBUF_LENGTH(head)+1);
|
||||
memcpy(tmpbuf, ptr, GWBUF_LENGTH(head));
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_receive_backend_auth] Invalid "
|
||||
"authentication message from backend dcb %p "
|
||||
@ -335,12 +337,12 @@ int gw_receive_backend_auth(
|
||||
dcb,
|
||||
dcb->fd,
|
||||
tmpbuf[4],
|
||||
tmpbuf);
|
||||
tmpbuf)));
|
||||
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Invalid authentication message from "
|
||||
"backend server. Authentication failed.");
|
||||
"backend server. Authentication failed.")));
|
||||
free(tmpbuf);
|
||||
rc = -1;
|
||||
}
|
||||
@ -356,7 +358,7 @@ int gw_receive_backend_auth(
|
||||
* although no bytes was read.
|
||||
*/
|
||||
rc = 0;
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_receive_backend_auth] Read zero bytes from "
|
||||
"backend dcb %p fd %d in state %s. n %d, head %p, len %d",
|
||||
@ -366,13 +368,13 @@ int gw_receive_backend_auth(
|
||||
STRDCBSTATE(dcb->state),
|
||||
n,
|
||||
head,
|
||||
(head == NULL) ? 0 : GWBUF_LENGTH(head));
|
||||
(head == NULL) ? 0 : GWBUF_LENGTH(head))));
|
||||
}
|
||||
else
|
||||
{
|
||||
ss_dassert(n < 0 && head == NULL);
|
||||
rc = -1;
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_receive_backend_auth] Reading from backend dcb %p "
|
||||
"fd %d in state %s failed. n %d, head %p, len %d",
|
||||
@ -382,7 +384,7 @@ int gw_receive_backend_auth(
|
||||
STRDCBSTATE(dcb->state),
|
||||
n,
|
||||
head,
|
||||
(head == NULL) ? 0 : GWBUF_LENGTH(head));
|
||||
(head == NULL) ? 0 : GWBUF_LENGTH(head))));
|
||||
}
|
||||
|
||||
return rc;
|
||||
@ -615,7 +617,7 @@ int gw_do_connect_to_backend(
|
||||
if (so < 0) {
|
||||
int eno = errno;
|
||||
errno = 0;
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error: Establishing connection to backend server "
|
||||
"%s:%d failed. Socket creation failed due "
|
||||
@ -623,7 +625,7 @@ int gw_do_connect_to_backend(
|
||||
host,
|
||||
port,
|
||||
eno,
|
||||
strerror(eno));
|
||||
strerror(eno))));
|
||||
rv = -1;
|
||||
goto return_rv;
|
||||
}
|
||||
@ -644,40 +646,40 @@ int gw_do_connect_to_backend(
|
||||
int rc;
|
||||
int oldfd = so;
|
||||
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error: Failed to connect backend server %s:%d, "
|
||||
"due %d, %s.",
|
||||
host,
|
||||
port,
|
||||
eno,
|
||||
strerror(eno));
|
||||
strerror(eno))));
|
||||
/** Close newly created socket. */
|
||||
rc = close(so);
|
||||
|
||||
if (rc != 0) {
|
||||
int eno = errno;
|
||||
errno = 0;
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error: Failed to "
|
||||
"close socket %d due %d, %s.",
|
||||
oldfd,
|
||||
eno,
|
||||
strerror(eno));
|
||||
strerror(eno))));
|
||||
}
|
||||
goto return_rv;
|
||||
}
|
||||
}
|
||||
*fd = so;
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_do_connect_to_backend] Connected to backend server "
|
||||
"%s:%d, fd %d.",
|
||||
pthread_self(),
|
||||
host,
|
||||
port,
|
||||
so);
|
||||
so)));
|
||||
#if defined(SS_DEBUG)
|
||||
conn_open[so] = true;
|
||||
#endif
|
||||
@ -1173,13 +1175,13 @@ mysql_send_auth_error (DCB *dcb, int packet_number, int in_affected_rows, const
|
||||
|
||||
if (dcb->state != DCB_STATE_POLLING)
|
||||
{
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [mysql_send_auth_error] dcb %p is in a state %s, "
|
||||
"and it is not in epoll set anymore. Skip error sending.",
|
||||
pthread_self(),
|
||||
dcb,
|
||||
STRDCBSTATE(dcb->state));
|
||||
STRDCBSTATE(dcb->state))));
|
||||
return 0;
|
||||
}
|
||||
mysql_errno = 1045;
|
||||
|
||||
@ -37,6 +37,8 @@
|
||||
#include <skygw_utils.h>
|
||||
#include <log_manager.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
/**
|
||||
* @file telnetd.c - telnet daemon protocol module
|
||||
*
|
||||
@ -107,7 +109,9 @@ version()
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
skygw_log_write(LOGFILE_TRACE, "Initialise Telnetd Protocol module.\n");
|
||||
LOGIF(LT, (skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"Initialise Telnetd Protocol module.\n")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -43,6 +43,8 @@
|
||||
#include <skygw_utils.h>
|
||||
#include <log_manager.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
static char *version_str = "V1.0.1";
|
||||
|
||||
/* The router entry points */
|
||||
@ -88,7 +90,10 @@ version()
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
skygw_log_write( LOGFILE_MESSAGE, "Initialise debug CLI router module %s.\n", version_str);
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"Initialise debug CLI router module %s.\n",
|
||||
version_str)));
|
||||
spinlock_init(&instlock);
|
||||
instances = NULL;
|
||||
}
|
||||
|
||||
@ -84,6 +84,8 @@
|
||||
|
||||
#include <mysql_client_server_protocol.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
static char *version_str = "V1.0.2";
|
||||
|
||||
/* The router entry points */
|
||||
@ -144,10 +146,10 @@ version()
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"Initialise readconnroute router module %s.\n", version_str);
|
||||
spinlock_init(&instlock);
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"Initialise readconnroute router module %s.\n", version_str)));
|
||||
spinlock_init(&instlock);
|
||||
instances = NULL;
|
||||
}
|
||||
|
||||
@ -245,10 +247,11 @@ int i, n;
|
||||
}
|
||||
else
|
||||
{
|
||||
skygw_log_write(LOGFILE_ERROR,
|
||||
"Warning : Unsupported router "
|
||||
"option %s for readconnroute.",
|
||||
options[i]);
|
||||
LOGIF(LE, (skygw_log_write(
|
||||
LOGFILE_ERROR,
|
||||
"Warning : Unsupported router "
|
||||
"option %s for readconnroute.",
|
||||
options[i])));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -281,13 +284,13 @@ ROUTER_CLIENT_SES *client_rses;
|
||||
BACKEND *candidate = NULL;
|
||||
int i;
|
||||
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [newSession] new router session with session "
|
||||
"%p, and inst %p.",
|
||||
pthread_self(),
|
||||
session,
|
||||
inst);
|
||||
inst)));
|
||||
|
||||
|
||||
client_rses = (ROUTER_CLIENT_SES *)calloc(1, sizeof(ROUTER_CLIENT_SES));
|
||||
@ -321,7 +324,7 @@ int i;
|
||||
*/
|
||||
for (i = 0; inst->servers[i]; i++) {
|
||||
if(inst->servers[i]) {
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [newSession] Examine server in port %d with "
|
||||
"%d connections. Status is %d, "
|
||||
@ -330,7 +333,7 @@ int i;
|
||||
inst->servers[i]->server->port,
|
||||
inst->servers[i]->current_connection_count,
|
||||
inst->servers[i]->server->status,
|
||||
inst->bitmask);
|
||||
inst->bitmask)));
|
||||
}
|
||||
|
||||
if (inst->servers[i] &&
|
||||
@ -367,11 +370,11 @@ int i;
|
||||
|
||||
/* no candidate server here, clean and return NULL */
|
||||
if (!candidate) {
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Failed to create new routing session. "
|
||||
"Couldn't find eligible candidate server. Freeing "
|
||||
"allocated resources.");
|
||||
"allocated resources.")));
|
||||
free(client_rses);
|
||||
return NULL;
|
||||
}
|
||||
@ -382,13 +385,13 @@ int i;
|
||||
*/
|
||||
atomic_add(&candidate->current_connection_count, 1);
|
||||
client_rses->backend = candidate;
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [newSession] Selected server in port %d. "
|
||||
"Connections : %d\n",
|
||||
pthread_self(),
|
||||
candidate->server->port,
|
||||
candidate->current_connection_count);
|
||||
candidate->current_connection_count)));
|
||||
/*
|
||||
* Open a backend connection, putting the DCB for this
|
||||
* connection in the client_rses->backend_dcb
|
||||
@ -464,7 +467,7 @@ static void freeSession(
|
||||
}
|
||||
spinlock_release(&router->lock);
|
||||
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [freeSession] Unlinked router_client_session %p from "
|
||||
"router %p and from server on port %d. Connections : %d. ",
|
||||
@ -472,7 +475,7 @@ static void freeSession(
|
||||
router_cli_ses,
|
||||
router,
|
||||
router_cli_ses->backend->server->port,
|
||||
prev_val-1);
|
||||
prev_val-1)));
|
||||
|
||||
free(router_cli_ses);
|
||||
}
|
||||
@ -559,11 +562,11 @@ routeQuery(ROUTER *instance, void *router_session, GWBUF *queue)
|
||||
|
||||
if (rses_is_closed || backend_dcb == NULL)
|
||||
{
|
||||
skygw_log_write(
|
||||
LOGIF(LE, (skygw_log_write(
|
||||
LOGFILE_ERROR,
|
||||
"Error: Failed to route MySQL command %d to backend "
|
||||
"server.",
|
||||
mysql_command);
|
||||
mysql_command)));
|
||||
goto return_rc;
|
||||
}
|
||||
|
||||
@ -581,14 +584,14 @@ routeQuery(ROUTER *instance, void *router_session, GWBUF *queue)
|
||||
}
|
||||
|
||||
CHK_PROTOCOL(((MySQLProtocol*)backend_dcb->protocol));
|
||||
skygw_log_write(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [readconnroute:routeQuery] Routed command %d to dcb %p "
|
||||
"with return value %d.",
|
||||
pthread_self(),
|
||||
mysql_command,
|
||||
backend_dcb,
|
||||
rc);
|
||||
rc)));
|
||||
return_rc:
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -30,6 +30,8 @@
|
||||
#include <dcb.h>
|
||||
#include <spinlock.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
/**
|
||||
* @file readwritesplit.c The entry points for the read/write query splitting
|
||||
* router module.
|
||||
@ -107,9 +109,9 @@ version()
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LM, (skygw_log_write_flush(
|
||||
LOGFILE_MESSAGE,
|
||||
"Initializing statemend-based read/write split router module.");
|
||||
"Initializing statemend-based read/write split router module.")));
|
||||
spinlock_init(&instlock);
|
||||
instances = NULL;
|
||||
}
|
||||
@ -167,11 +169,11 @@ static ROUTER* createInstance(
|
||||
|
||||
if (options != NULL)
|
||||
{
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LM, (skygw_log_write_flush(
|
||||
LOGFILE_MESSAGE,
|
||||
"Router options supplied to read/write statement router "
|
||||
"module but none are supported. The options will be "
|
||||
"ignored.");
|
||||
"ignored.")));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -230,11 +232,11 @@ static ROUTER* createInstance(
|
||||
}
|
||||
else
|
||||
{
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Warning : Unsupported router option %s "
|
||||
"for readwritesplitrouter.",
|
||||
options[i]);
|
||||
options[i])));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -541,7 +543,7 @@ static int routeQuery(
|
||||
|
||||
if (rses_is_closed || (master_dcb == NULL && slave_dcb == NULL))
|
||||
{
|
||||
skygw_log_write(
|
||||
LOGIF(LE, (skygw_log_write(
|
||||
LOGFILE_ERROR,
|
||||
"Error: Failed to route %s:%s:\"%s\" to backend server. "
|
||||
"%s.",
|
||||
@ -549,25 +551,26 @@ static int routeQuery(
|
||||
STRQTYPE(qtype),
|
||||
(querystr == NULL ? "(empty)" : querystr),
|
||||
(rses_is_closed ? "Router was closed" :
|
||||
"Router has no backend servers where to route to"));
|
||||
"Router has no backend servers where to route to"))));
|
||||
|
||||
goto return_ret;
|
||||
}
|
||||
|
||||
skygw_log_write(LOGFILE_TRACE,
|
||||
"String\t\"%s\"",
|
||||
querystr == NULL ? "(empty)" : querystr);
|
||||
skygw_log_write(LOGFILE_TRACE,
|
||||
LOGIF(LT, (skygw_log_write(LOGFILE_TRACE,
|
||||
"String\t\"%s\"",
|
||||
querystr == NULL ? "(empty)" : querystr)));
|
||||
LOGIF(LT, (skygw_log_write(LOGFILE_TRACE,
|
||||
"Packet type\t%s",
|
||||
STRPACKETTYPE(packet_type));
|
||||
STRPACKETTYPE(packet_type))));
|
||||
|
||||
switch (qtype) {
|
||||
case QUERY_TYPE_WRITE:
|
||||
skygw_log_write(LOGFILE_TRACE,
|
||||
"%lu [routeQuery:rwsplit] Query type\t%s, routing to "
|
||||
"Master.",
|
||||
pthread_self(),
|
||||
STRQTYPE(qtype));
|
||||
LOGIF(LT, (skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"%lu [routeQuery:rwsplit] Query type\t%s, routing to "
|
||||
"Master.",
|
||||
pthread_self(),
|
||||
STRQTYPE(qtype))));
|
||||
|
||||
ret = master_dcb->func.write(master_dcb, querybuf);
|
||||
atomic_add(&inst->stats.n_master, 1);
|
||||
@ -576,24 +579,24 @@ static int routeQuery(
|
||||
break;
|
||||
|
||||
case QUERY_TYPE_READ:
|
||||
skygw_log_write(LOGFILE_TRACE,
|
||||
"%lu [routeQuery:rwsplit] Query type\t%s, "
|
||||
"routing to Slave.",
|
||||
pthread_self(),
|
||||
STRQTYPE(qtype));
|
||||
LOGIF(LT, (skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"%lu [routeQuery:rwsplit] Query type\t%s, "
|
||||
"routing to Slave.",
|
||||
pthread_self(),
|
||||
STRQTYPE(qtype))));
|
||||
|
||||
ret = slave_dcb->func.write(slave_dcb, querybuf);
|
||||
atomic_add(&inst->stats.n_slave, 1);
|
||||
|
||||
goto return_ret;
|
||||
break;
|
||||
|
||||
|
||||
case QUERY_TYPE_SESSION_WRITE:
|
||||
/**
|
||||
* Update connections which are used in this session.
|
||||
*
|
||||
* For each connection, add a flag which indicates that
|
||||
* For each connection updated, add a flag which indicates that
|
||||
* OK Packet must arrive for this command before server
|
||||
* in question is allowed to be used by router. That is,
|
||||
* maintain a queue of pending OK packets and remove item
|
||||
@ -618,12 +621,16 @@ static int routeQuery(
|
||||
* vraa 9.12.13
|
||||
*
|
||||
*/
|
||||
#if defined(FULL_RWSPLIT)
|
||||
skygw_log_write(LOGFILE_TRACE,
|
||||
"%lu [routeQuery:rwsplit] Query type\t%s, "
|
||||
"routing to all servers.",
|
||||
pthread_self(),
|
||||
STRQTYPE(qtype));
|
||||
LOGIF(LT, (skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"%lu [routeQuery:rwsplit] DCB M:%p s:%p, "
|
||||
"Query type\t%s, "
|
||||
"packet type %s, routing to all servers.",
|
||||
pthread_self(),
|
||||
master_dcb,
|
||||
slave_dcb,
|
||||
STRQTYPE(qtype),
|
||||
STRPACKETTYPE(packet_type))));
|
||||
|
||||
bufcopy = gwbuf_clone(querybuf);
|
||||
|
||||
@ -646,6 +653,11 @@ static int routeQuery(
|
||||
bufcopy);
|
||||
break;
|
||||
|
||||
case COM_QUERY:
|
||||
ret = master_dcb->func.session(master_dcb, (void *)querybuf);
|
||||
slave_dcb->func.session(slave_dcb, (void *)bufcopy);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = master_dcb->func.session(master_dcb, (void *)querybuf);
|
||||
slave_dcb->func.session(slave_dcb, (void *)bufcopy);
|
||||
@ -655,15 +667,14 @@ static int routeQuery(
|
||||
atomic_add(&inst->stats.n_all, 1);
|
||||
goto return_ret;
|
||||
break;
|
||||
#else
|
||||
/** fall through */
|
||||
#endif
|
||||
|
||||
default:
|
||||
skygw_log_write(LOGFILE_TRACE,
|
||||
"%lu [routeQuery:rwsplit] Query type\t%s, "
|
||||
"routing to Master by default.",
|
||||
pthread_self(),
|
||||
STRQTYPE(qtype));
|
||||
LOGIF(LT, (skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"%lu [routeQuery:rwsplit] Query type\t%s, "
|
||||
"routing to Master by default.",
|
||||
pthread_self(),
|
||||
STRQTYPE(qtype))));
|
||||
|
||||
/**
|
||||
* Is this really ok?
|
||||
@ -892,17 +903,17 @@ static bool search_backend_servers(
|
||||
BACKEND* be = router->servers[i];
|
||||
|
||||
if (be != NULL) {
|
||||
skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"%lu [search_backend_servers] Examine server "
|
||||
"%s:%d with %d connections. Status is %d, "
|
||||
"router->bitvalue is %d",
|
||||
pthread_self(),
|
||||
be->backend_server->name,
|
||||
be->backend_server->port,
|
||||
be->backend_conn_count,
|
||||
be->backend_server->status,
|
||||
router->bitmask);
|
||||
LOGIF(LT, (skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"%lu [search_backend_servers] Examine server "
|
||||
"%s:%d with %d connections. Status is %d, "
|
||||
"router->bitvalue is %d",
|
||||
pthread_self(),
|
||||
be->backend_server->name,
|
||||
be->backend_server->port,
|
||||
be->backend_conn_count,
|
||||
be->backend_server->status,
|
||||
router->bitmask)));
|
||||
}
|
||||
|
||||
if (be != NULL &&
|
||||
@ -958,36 +969,36 @@ static bool search_backend_servers(
|
||||
|
||||
if (p_slave != NULL && be_slave == NULL) {
|
||||
succp = false;
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Couldn't find suitable Slave from %d "
|
||||
"candidates.",
|
||||
i);
|
||||
i)));
|
||||
}
|
||||
|
||||
if (p_master != NULL && be_master == NULL) {
|
||||
succp = false;
|
||||
skygw_log_write_flush(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Couldn't find suitable Master from %d "
|
||||
"candidates.",
|
||||
i);
|
||||
i)));
|
||||
}
|
||||
|
||||
if (be_slave != NULL) {
|
||||
*p_slave = be_slave;
|
||||
skygw_log_write(
|
||||
LOGIF(LT, (skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"%lu [readwritesplit:search_backend_servers] Selected "
|
||||
"Slave %s:%d from %d candidates.",
|
||||
pthread_self(),
|
||||
be_slave->backend_server->name,
|
||||
be_slave->backend_server->port,
|
||||
i);
|
||||
i)));
|
||||
}
|
||||
if (be_master != NULL) {
|
||||
*p_master = be_master;
|
||||
skygw_log_write(
|
||||
LOGIF(LT, (skygw_log_write(
|
||||
LOGFILE_TRACE,
|
||||
"%lu [readwritesplit:search_backend_servers] Selected "
|
||||
"Master %s:%d "
|
||||
@ -995,7 +1006,7 @@ static bool search_backend_servers(
|
||||
pthread_self(),
|
||||
be_master->backend_server->name,
|
||||
be_master->backend_server->port,
|
||||
i);
|
||||
i)));
|
||||
}
|
||||
return succp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user