From 08b5694faa811ac9f572d009228d6d5706a4989c Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 20 Apr 2022 22:15:35 +0200 Subject: [PATCH] mxqd: Do not disconnect from mysql server on job start 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. --- mxqd.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mxqd.c b/mxqd.c index f3c195aa..880059f3 100644 --- a/mxqd.c +++ b/mxqd.c @@ -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"); @@ -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);