diff --git a/src/common/slurm_accounting_storage.c b/src/common/slurm_accounting_storage.c index f5a73a66c18992155813c6bbcf54fba8addaba6b..c82dd7fc61ded699f855a3ea2b56d0ffcdf5fb31 100644 --- a/src/common/slurm_accounting_storage.c +++ b/src/common/slurm_accounting_storage.c @@ -283,8 +283,8 @@ static bool init_run = false; static uint16_t enforce = 0; /* - * load into the storage information about a job, - * typically when it begins execution, but possibly earlier + * If running with slurmdbd don't run if we don't have an index, else + * go ahead. */ extern int jobacct_storage_job_start_direct(void *db_conn, struct job_record *job_ptr) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 3857f37153a9cd83ab1766e35ec6467a52c9ab76..25065fb0efd1487e26174d80fe857e1915b9edee 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -7522,7 +7522,8 @@ static int _list_find_job_old(void *job_entry, void *key) * when slurmdbd comes back up since we won't get another chance. * job_start won't pend for job_db_inx when the job is finished. */ - jobacct_storage_job_start_direct(acct_db_conn, job_ptr); + if (with_slurmdbd && !job_ptr->db_index) + jobacct_storage_g_job_start(acct_db_conn, job_ptr); return 1; /* Purge the job */ }