Ticket #1583: 0001-Fix-1583-only-update-project-usage-in-spool-if-it-ha.patch

File 0001-Fix-1583-only-update-project-usage-in-spool-if-it-ha.patch, 2.2 KB (added by markdixon, 3 years ago)
  • source/libs/sched/sgeee.c

    From 9ae878d7f3266b33986e7f2b3ee5eaf21d9de333 Mon Sep 17 00:00:00 2001
    From: Mark Dixon <m.c.dixon@leeds.ac.uk>
    Date: Tue, 6 Sep 2016 11:06:23 +0100
    Subject: [PATCH] Fix #1583 only update project usage in spool if it has
     changed
    
    Like user objects, project objects used to only be updated in the spool
    if they had changed. Monster change AA-2007-08-20-0 splitted user and
    project usage into separate data structures but neglected to filter
    project objects on scheduling sequence number.
    
    This commit causes project objects in the spool only to be updated if
    they have changed, instead of every scheduling interval.
    ---
     source/libs/sched/sgeee.c | 10 ++++++----
     1 file changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/source/libs/sched/sgeee.c b/source/libs/sched/sgeee.c
    index dbe783d..cad0498 100644
    a b sge_build_sgeee_orders(scheduler_all_data_t *lists, lList *running_jobs, lList * 
    40374037
    40384038   if (update_usage_and_configuration) {
    40394039
    4040       /*-----------------------------------------------------------------
    4041        * build update user usage order
    4042        *-----------------------------------------------------------------*/
    4043 
    40444040      /* NOTE: make sure we get all usage entries which have been decayed
    40454041         or have accumulated additional usage */
    40464042
    40474043      user_where = lWhere("%T(%I > %u)", UU_Type, UU_usage_seqno, last_seqno);
     4044      prj_where = lWhere("%T(%I > %u)", PR_Type, PR_usage_seqno, last_seqno);
     4045
     4046      /*-----------------------------------------------------------------
     4047       * build update user usage order
     4048       *-----------------------------------------------------------------*/
    40484049
    40494050      if (lists->user_list) {
    40504051         norders = lGetNumberOfElem(order_list);
    sge_build_sgeee_orders(scheduler_all_data_t *lists, lList *running_jobs, lList * 
    40654066      /*-----------------------------------------------------------------
    40664067       * build update project usage order
    40674068       *-----------------------------------------------------------------*/
     4069
    40684070      if (lists->project_list) {
    40694071         norders = lGetNumberOfElem(order_list);
    40704072         if ((up_list = lSelect("", lists->project_list, prj_where, prj_usage_what))) {