Skip to content
Snippets Groups Projects
Commit 381f9408 authored by Brian Christiansen's avatar Brian Christiansen
Browse files

Revert "Filter out duplicate federated jobs"

This reverts commit d31965f3.
parent b82aaffb
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,6 @@ strong_alias(list_peek, slurm_list_peek);
strong_alias(list_enqueue, slurm_list_enqueue);
strong_alias(list_dequeue, slurm_list_dequeue);
strong_alias(list_iterator_create, slurm_list_iterator_create);
strong_alias(list_iterator_copy, slurm_list_iterator_copy);
strong_alias(list_iterator_reset, slurm_list_iterator_reset);
strong_alias(list_iterator_destroy, slurm_list_iterator_destroy);
strong_alias(list_next, slurm_list_next);
......@@ -619,18 +618,6 @@ list_iterator_create (List l)
return i;
}
void list_iterator_copy(ListIterator *dst, ListIterator src)
{
assert(dst);
assert(src);
if (!*dst)
*dst = list_iterator_alloc();
if (*dst)
memcpy(*dst, src, sizeof(struct listIterator));
}
/* list_iterator_reset()
*/
void
......
......@@ -250,11 +250,6 @@ ListIterator list_iterator_create (List l);
* list [l], or lsd_nomem_error() on failure.
*/
void list_iterator_copy(ListIterator *dst, ListIterator src);
/*
* Copy src into dst (return new dst if NULL).
*/
void list_iterator_reset (ListIterator i);
/*
* Resets the list iterator [i] to start traversal at the beginning
......
......@@ -448,26 +448,11 @@ void _init_params(void)
params.units = NO_VAL;
}
static int _find_job_dbrec(void *object, void *arg)
{
slurmdb_job_rec_t *job = (slurmdb_job_rec_t *)object;
slurmdb_job_rec_t *arg_job = (slurmdb_job_rec_t *)arg;
/* Show sibling jobs that that are related. e.g. when a pending sibling
* job is cancelled all siblings have the state as cancelled. Since
* jobids won't roll in a day -- unless the system is amazing -- just
* remove jobs that are older than a day. */
if ((job->jobid == arg_job->jobid) &&
(job->submit > (arg_job->submit + 86400)))
return true;
return false;
}
int get_data(void)
{
slurmdb_job_rec_t *job = NULL;
slurmdb_step_rec_t *step = NULL;
ListIterator itr = NULL, itr_cpy = NULL;
ListIterator itr = NULL;
ListIterator itr_step = NULL;
slurmdb_job_cond_t *job_cond = params.job_cond;
......@@ -483,21 +468,6 @@ int get_data(void)
itr = list_iterator_create(jobs);
while((job = list_next(itr))) {
if (params.cluster_name && !params.opt_dup) {
slurmdb_job_rec_t *ljob = NULL;
/* Remove duplicate federated jobs. The db will remove
* duplicates for one cluster but not when jobs for
* multiple clusters are requested. Remove this job if
* there were jobs with the same id submitted in the
* future. */
list_iterator_copy(&itr_cpy, itr);
if ((ljob = list_find(itr_cpy, _find_job_dbrec, job))) {
list_delete_item(itr);
continue;
}
}
if (job->user) {
struct passwd *pw = NULL;
if ((pw=getpwnam(job->user)))
......@@ -529,8 +499,6 @@ int get_data(void)
}
list_iterator_destroy(itr_step);
}
if (itr_cpy)
xfree(itr_cpy); /* only xfree since it's a copy of itr */
list_iterator_destroy(itr);
return SLURM_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment