diff --git a/NEWS b/NEWS index ed2f125332a26ba3d808139efee1fb2a967abbb3..cb12ef0064bea3dfd1a6af2c9c8da60d4155bd77 100644 --- a/NEWS +++ b/NEWS @@ -182,6 +182,8 @@ documents those changes that are of interest to users and admins. -- When using sacct -c to read the job completion data compute the correct job elapsed time. -- Perl package: Define some missing node states. + -- When using AccountingStorageType=accounting_storage/mysql zero out the + database index for the array elements avoiding duplicate database values. * Changes in Slurm 14.03.6 ========================== diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 320f3316438177e5ce66dd946f659b90ac08f253..9c6ea69eb0ad7a2884732d5b642b8bfbee8e3cce 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3387,6 +3387,11 @@ struct job_record *_job_rec_copy(struct job_record *job_ptr) checkpoint_copy_jobinfo(job_ptr->check_job); } job_ptr_new->comment = xstrdup(job_ptr->comment); + + /* Make sure the db_index is zero for array elements in case the + * first element had an index already assigned. */ + job_ptr_new->db_index = 0; + job_ptr_new->front_end_ptr = NULL; /* struct job_details *details; *** NOTE: Copied below */ job_ptr_new->gres = xstrdup(job_ptr->gres);