Skip to content

Commit

Permalink
mxqd: Do not disconnect from mysql server on job start
Browse files Browse the repository at this point in the history
We no longer need to disconnect from the mysql server and reconnect to
it every time we start a job now that er exec() the reaper. The socket
ist set to CLOEXEC, so it isn't leaked and the memory image of the mysql
library is replaced anyway.
  • Loading branch information
donald committed May 5, 2022
1 parent e807497 commit c7a0686
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,8 +1202,6 @@ static unsigned long start_job(struct mxq_group_list *glist)
mx_free_null(job->host_cpu_set_str);
job->host_cpu_set_str = mx_cpuset_to_str(&job->host_cpu_set);

mx_mysql_disconnect(server->mysql);

pid = fork();
if (pid < 0) {
mx_log_err("fork: %m");
Expand All @@ -1219,8 +1217,6 @@ static unsigned long start_job(struct mxq_group_list *glist)

gettimeofday(&job->stats_starttime, NULL);

mx_mysql_connect_forever(&(server->mysql));

job->host_pid = pid;
job->host_slots = glist->slots_per_job;
res = mxq_set_job_status_running(server->mysql, job);
Expand Down

0 comments on commit c7a0686

Please sign in to comment.