Remove reconfigure,etc and limit show connectionlist num

This commit is contained in:
wangbin579 2018-07-31 14:28:48 +08:00
parent 851d64fbdd
commit e2839023ab
4 changed files with 6 additions and 58 deletions

View File

@ -406,8 +406,13 @@ void admin_show_connectionlist(network_mysqld_con *admin_con, int show_count)
return;
}
int number = show_count==-1 ? 65536 : show_count;
int number = 256;
if (show_count > 0) {
if (show_count < 256) {
number = show_count;
}
}
chassis *chas = admin_con->srv;
chassis_private *priv = chas->priv;
chassis_plugin_config *config = admin_con->config;

View File

@ -33,18 +33,11 @@ cetus_pid_t cetus_parent;
cetus_pid_t cetus_new_binary;
sig_atomic_t cetus_reap;
sig_atomic_t cetus_sigio;
sig_atomic_t cetus_sigalrm;
sig_atomic_t cetus_terminate;
sig_atomic_t cetus_quit;
unsigned int cetus_exiting;
sig_atomic_t cetus_reconfigure;
sig_atomic_t cetus_reopen;
sig_atomic_t cetus_change_binary;
unsigned int cetus_inherited;
unsigned int cetus_daemonized;
sig_atomic_t cetus_noaccept;
unsigned int cetus_restart;
@ -116,12 +109,6 @@ cetus_master_process_cycle(cetus_cycle_t *cycle)
struct itimerval itv;
unsigned int live;
if (cycle->daemon_mode) {
cetus_daemonized = 1;
}
cetus_start_worker_processes(cycle, cycle->worker_processes,
CETUS_PROCESS_RESPAWN);
@ -169,24 +156,6 @@ cetus_master_process_cycle(cetus_cycle_t *cycle)
continue;
}
if (cetus_reconfigure) {
cetus_reconfigure = 0;
g_message("%s: reconfiguring", G_STRLOC);
/* init cycle */
cetus_start_worker_processes(cycle, cycle->worker_processes,
CETUS_PROCESS_JUST_RESPAWN);
open_admin(cycle);
/* allow new processes to start */
usleep(100 * 1000);
live = 1;
cetus_signal_worker_processes(cycle,
cetus_signal_value(CETUS_SHUTDOWN_SIGNAL));
}
if (cetus_restart) {
cetus_restart = 0;
cetus_start_worker_processes(cycle, cycle->worker_processes,
@ -196,12 +165,6 @@ cetus_master_process_cycle(cetus_cycle_t *cycle)
live = 1;
}
if (cetus_reopen) {
cetus_reopen = 0;
g_message("%s: reopening logs", G_STRLOC);
cetus_signal_worker_processes(cycle,
cetus_signal_value(CETUS_REOPEN_SIGNAL));
}
if (cetus_change_binary) {
g_message("%s: changing binary", G_STRLOC);
@ -581,11 +544,6 @@ cetus_worker_process_cycle(cetus_cycle_t *cycle, void *data)
/* Call cetus shut down */
}
}
if (cetus_reopen) {
cetus_reopen = 0;
g_message("%s: reopening logs", G_STRLOC);
}
}
}
@ -798,7 +756,6 @@ cetus_channel_handler(int fd, short events, void *user_data)
break;
case CETUS_CMD_REOPEN:
cetus_reopen = 1;
break;
case CETUS_CMD_OPEN_CHANNEL:

View File

@ -22,18 +22,12 @@ extern unsigned int cetus_process;
extern unsigned int cetus_worker;
extern pid_t cetus_pid;
extern pid_t cetus_new_binary;
extern unsigned int cetus_inherited;
extern unsigned int cetus_daemonized;
extern unsigned int cetus_exiting;
extern sig_atomic_t cetus_reap;
extern sig_atomic_t cetus_sigio;
extern sig_atomic_t cetus_sigalrm;
extern sig_atomic_t cetus_quit;
extern sig_atomic_t cetus_terminate;
extern sig_atomic_t cetus_noaccept;
extern sig_atomic_t cetus_reconfigure;
extern sig_atomic_t cetus_reopen;
extern sig_atomic_t cetus_change_binary;

View File

@ -371,21 +371,15 @@ cetus_signal_handler(int signo, siginfo_t *siginfo, void *ucontext)
break;
case cetus_signal_value(CETUS_RECONFIGURE_SIGNAL):
cetus_reconfigure = 1;
action = ", reconfiguring";
break;
case cetus_signal_value(CETUS_REOPEN_SIGNAL):
cetus_reopen = 1;
action = ", reopening logs";
break;
case SIGALRM:
cetus_sigalrm = 1;
break;
case SIGIO:
cetus_sigio = 1;
break;
case SIGCHLD:
@ -414,8 +408,6 @@ cetus_signal_handler(int signo, siginfo_t *siginfo, void *ucontext)
break;
case cetus_signal_value(CETUS_REOPEN_SIGNAL):
cetus_reopen = 1;
action = ", reopening logs";
break;
case cetus_signal_value(CETUS_RECONFIGURE_SIGNAL):