Skip to content

Commit

Permalink
mxqd_control: account orphaned groups
Browse files Browse the repository at this point in the history
The count of running jobs and threads of a group were
not deducted from the counters the server keeps for the user
and the cluster.

This lead to wrong scheduling, as users were thought to have more
running jobs than they really had.

Add code to maintain the global counters.
  • Loading branch information
donald committed Sep 5, 2016
1 parent 7fe79ac commit d897a2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mxqd_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,11 @@ int server_remove_orphaned_groups(struct mxq_server *server)
group->group_id);

ulist->group_cnt--;
ulist->global_slots_running -= glist->global_slots_running;
ulist->global_threads_running -= glist->global_threads_running;
server->group_cnt--;
server->global_slots_running -= glist->global_slots_running;
server->global_threads_running -= glist->global_threads_running;
cnt++;
mxq_group_free_content(group);
mx_free_null(glist);
Expand Down

0 comments on commit d897a2a

Please sign in to comment.