Cleanup some log messages
This commit is contained in:
@ -180,6 +180,7 @@ HASHENTRIES *entry, *ptr;
|
|||||||
}
|
}
|
||||||
free(table->entries);
|
free(table->entries);
|
||||||
|
|
||||||
|
hashtable_write_unlock(table);
|
||||||
if (!table->ht_isflat)
|
if (!table->ht_isflat)
|
||||||
{
|
{
|
||||||
free(table);
|
free(table);
|
||||||
@ -498,7 +499,7 @@ hashtable_read_lock(HASHTABLE *table)
|
|||||||
;
|
;
|
||||||
spinlock_acquire(&table->spin);
|
spinlock_acquire(&table->spin);
|
||||||
}
|
}
|
||||||
table->n_readers++;
|
atomic_add(&table->n_readers, 1);
|
||||||
spinlock_release(&table->spin);
|
spinlock_release(&table->spin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1089,8 +1089,8 @@ int service_refresh_users(SERVICE *service) {
|
|||||||
if (! spinlock_acquire_nowait(&service->users_table_spin)) {
|
if (! spinlock_acquire_nowait(&service->users_table_spin)) {
|
||||||
LOGIF(LD, (skygw_log_write_flush(
|
LOGIF(LD, (skygw_log_write_flush(
|
||||||
LOGFILE_DEBUG,
|
LOGFILE_DEBUG,
|
||||||
"%lu [service_refresh_users] failed to get get lock for loading new users' table: another thread is loading users",
|
"%s: [service_refresh_users] failed to get get lock for loading new users' table: another thread is loading users",
|
||||||
pthread_self())));
|
service->name)));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1098,12 +1098,12 @@ int service_refresh_users(SERVICE *service) {
|
|||||||
|
|
||||||
/* check if refresh rate limit has exceeded */
|
/* check if refresh rate limit has exceeded */
|
||||||
if ( (time(NULL) < (service->rate_limit.last + USERS_REFRESH_TIME)) || (service->rate_limit.nloads > USERS_REFRESH_MAX_PER_TIME)) {
|
if ( (time(NULL) < (service->rate_limit.last + USERS_REFRESH_TIME)) || (service->rate_limit.nloads > USERS_REFRESH_MAX_PER_TIME)) {
|
||||||
|
spinlock_release(&service->users_table_spin);
|
||||||
LOGIF(LE, (skygw_log_write_flush(
|
LOGIF(LE, (skygw_log_write_flush(
|
||||||
LOGFILE_ERROR,
|
LOGFILE_ERROR,
|
||||||
"Refresh rate limit exceeded for load of users' table for service '%s'.",
|
"%s: Refresh rate limit exceeded for load of users' table.",
|
||||||
service->name)));
|
service->name)));
|
||||||
|
|
||||||
spinlock_release(&service->users_table_spin);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,6 +504,13 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
|
|||||||
username,
|
username,
|
||||||
stage1_hash);
|
stage1_hash);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE,
|
||||||
|
"%s: login attempt for user %s, user not "
|
||||||
|
"found.",
|
||||||
|
dcb->service->name, username)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do again the database check */
|
/* Do again the database check */
|
||||||
|
Reference in New Issue
Block a user