Skip to content

Commit

Permalink
mxqd: Fix mxq_group status inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Jul 27, 2015
1 parent bbe8f57 commit f7bd620
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mxq_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ inline uint64_t mxq_group_jobs_active(struct mxq_group *g)
active -= mxq_group_jobs_done(g);

if (active != g->group_jobs_inq+g->group_jobs_running)
mx_log_warning("BUG: mxq_group: inconsistent 'active' (inq+run) value");
mx_log_warning("BUG: mxq_group: inconsistent 'active'=%lu (inq=%lu+run=%lu)=%lu value",
active, g->group_jobs_inq, g->group_jobs_running, g->group_jobs_inq+g->group_jobs_running);

return active;
}
Expand All @@ -135,7 +136,8 @@ inline uint64_t mxq_group_jobs_inq(struct mxq_group *g)
inq -= g->group_jobs_running;

if (inq != g->group_jobs_inq)
mx_log_warning("BUG: mxq_group: inconsistent inq value");
mx_log_warning("BUG: mxq_group: inconsistent inq value (%lu != %lu)",
inq, g->group_jobs_inq);

return inq;
}
Expand Down
1 change: 1 addition & 0 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ struct mxq_job_list *group_add_job(struct mxq_group_list *group, struct mxq_job
server->threads_running += mxqgrp->job_threads;

mxqgrp->group_jobs_running++;
mxqgrp->group_jobs_inq--;

group->jobs_running++;
user->jobs_running++;
Expand Down

0 comments on commit f7bd620

Please sign in to comment.