fill in children_hist when registering collection
authorMiloš Mulač <mulac@civ.zcu.cz>
Thu, 7 Dec 2006 14:17:56 +0000 (14:17 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Thu, 7 Dec 2006 14:17:56 +0000 (14:17 +0000)
switch between collection states correctly

org.glite.lb.server/src/jobstat.c
org.glite.lb.server/src/process_event.c

index 7c71d96..ceedc5a 100644 (file)
@@ -807,6 +807,7 @@ static edg_wll_ErrorCode update_parent_status(edg_wll_Context ctx, edg_wll_JobSt
                                                goto err;
                                }
                        }
+                       update_hist = 1;
                        break;
                case EDG_WLL_JOB_DONE:
                        if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
@@ -823,6 +824,7 @@ static edg_wll_ErrorCode update_parent_status(edg_wll_Context ctx, edg_wll_JobSt
                                        }
                                }
                        }
+                       update_hist = 1;
                        break;
                case EDG_WLL_JOB_CLEARED: 
                        if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
@@ -838,10 +840,11 @@ static edg_wll_ErrorCode update_parent_status(edg_wll_Context ctx, edg_wll_JobSt
                                        }
                                }
                        }
+                       update_hist = 1;
                        break;
                default:
                        if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
-                       pis->pub.children_hist[EDG_WLL_JOB_UNDEF+1]++;
+                       pis->pub.children_hist[EDG_WLL_JOB_UNKNOWN+1]++;
                        // update_hist = 1; - triggered by the next case or not needed
                        break;
        }
@@ -868,7 +871,7 @@ static edg_wll_ErrorCode update_parent_status(edg_wll_Context ctx, edg_wll_JobSt
                        break;
                default:
                        if (load_parent_intJobStat(ctx, cis, &pis)) goto err;
-                       pis->pub.children_hist[EDG_WLL_JOB_UNDEF+1]--;
+                       pis->pub.children_hist[EDG_WLL_JOB_UNKNOWN+1]--;
                        // update_hist = 1; - triggered by the previous case or not needed
                        break;
        }
index 8e76b4c..573a163 100644 (file)
@@ -782,9 +782,11 @@ int processEvent(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, char
                                        case EDG_WLL_REGJOB_DAG:
                                        case EDG_WLL_REGJOB_PARTITIONED:
                                                js->pub.jobtype = EDG_WLL_STAT_DAG;
+                                               js->pub.children_hist[EDG_WLL_JOB_UNKNOWN+1] = js->pub.children_num;
                                                break;
                                        case EDG_WLL_REGJOB_COLLECTION:
                                                js->pub.jobtype = EDG_WLL_STAT_COLLECTION;
+                                               js->pub.children_hist[EDG_WLL_JOB_UNKNOWN+1] = js->pub.children_num;
                                                break;
                                        default:
                                                break;