Skip to content

Commit 2acd4eb

Browse files
committed
marked the place where CS-619 must be fixed + some explanations
1 parent 2703cdb commit 2acd4eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/daemons/qmaster/sge_give_jobs.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,9 +1677,13 @@ reduce_queue_limit(const lList *master_centry_list, lListElem *qep, lListElem *j
16771677
DENTER(BASIS_LAYER);
16781678
const char *s;
16791679
const lList *master_ehost_list = *ocs::DataStore::get_master_list(SGE_TYPE_EXECHOST);
1680+
// @todo CS-612 we also need to look at master or slave requests
1681+
// might be tricky for the first gdil entry (qep) as it can contain both master and slave tasks
16801682
const lListElem *res = lGetElemStr(job_get_hard_resource_list(jep), CE_name, rlimit_name);
16811683

16821684
if ((res != nullptr) && (s = lGetString(res, CE_stringval))) {
1685+
// we know: if the job was scheduled, the job request must have been <= the queue limit
1686+
// therefore we can just set the queue limit to the job request
16831687
DPRINTF("job reduces queue limit: %s = %s (was %s)\n", rlimit_name, s, lGetString(qep, nm));
16841688
lSetString(qep, nm, s);
16851689
} else { /* enforce default request if set, but only if the consumable is */

0 commit comments

Comments
 (0)