mkdir -p ${PREFIX}/include/${globalprefix}/${lbprefix} ; \
(cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${lbprefix}) ; \
install -m 644 ${STATIC_LIB_BK} ${PREFIX}/lib; \
- if [ x${LB_STANDALONE} = x ]; then \
+ if [ x${LB_STANDALONE} = x -a x${PLUGIN_LIB} != x ]; then \
${INSTALL} -m 755 ${PLUGIN_LIB} ${PREFIX}/lib; \
fi; \
${INSTALL} -m 644 ${top_srcdir}/interface/srv_perf.h ${PREFIX}/include/${globalprefix}/${lbprefix}; \
int db_parent_store(edg_wll_Context, edg_wll_Event *, intJobStat *);
int handle_request(edg_wll_Context,char *);
int create_reply(const edg_wll_Context,char **);
+int trans_db_store(edg_wll_Context,char *,edg_wll_Event *,intJobStat *);
+
int edg_wll_delete_event(edg_wll_Context,const char *, int);
#include "lbs_db.h"
#include "lock.h"
#include "il_lbproxy.h"
+#include "jobstat.h"
#ifdef LB_PERF
#include "glite/lb/lb_perftest.h"
err = edg_wll_StepIntState(ctx,ev->any.jobId, ev, seq, ctx->isProxy? NULL: &newstat);
}
- if (edg_wll_UnlockJob(ctx,ev->any.jobId)) goto err;
+ /* XXX: in edg_wll_StepIntState()
+ * if (edg_wll_UnlockJob(ctx,ev->any.jobId)) goto err;
+ */
if (err) goto err;
db_actual_store(ctx, event, ev, &newstat);
/*
* update stored state according to the new event
* (must be called with the job locked)
+
+ * XXX: job is locked on entry, unlocked in this function
*/
edg_wll_ErrorCode edg_wll_StepIntState(edg_wll_Context ctx,
res = processEvent(ijsp, e, seq, be_strict, &errstring);
if (res == RET_FATAL || res == RET_INTERNAL) { /* !strict */
edg_wll_FreeStatus(&oldstat);
+ edg_wll_UnlockJob(ctx,job); /* XXX: error lost */
return edg_wll_SetError(ctx, EINVAL, errstring);
}
edg_wll_StoreIntState(ctx, ijsp, seq);
+ if (edg_wll_UnlockJob(ctx,job)) goto err;
+
edg_wll_UpdateStatistics(ctx,&oldstat,e,&ijsp->pub);
/* check whether subjob state change does not change parent state */
/* FIXME: we miss state change in the case of seq != 0
* Does anybody care? */
+ /* FIXME: collection parent status is wrong in this case.
+ However, it should not happen (frequently).
+ Right approach is computing parent status from scratch.
+ */
+
+ if (edg_wll_UnlockJob(ctx,job)) goto err;
edg_wll_UpdateStatistics(ctx,NULL,e,&jobstat.pub);
if (ctx->rgma_export) write2rgma_status(&jobstat.pub);
}
else destroy_intJobStat(&jobstat);
}
+ else edg_wll_UnlockJob(ctx,job);
+err:
return edg_wll_Error(ctx, NULL, NULL);
}
edg_wll_ErrorCode edg_wll_StoreIntStateEmbryonic(edg_wll_Context, edg_wlc_JobId, char *icnames, char *values, edg_wll_bufInsert *bi);
edg_wll_ErrorCode edg_wll_LoadIntState(edg_wll_Context , edg_wlc_JobId , int, intJobStat **);
+edg_wll_ErrorCode edg_wll_StepIntStateParent(edg_wll_Context,edg_wlc_JobId,edg_wll_Event *,int,intJobStat *,edg_wll_JobStat *);
+
+
intJobStat* dec_intJobStat(char *, char **);
char *enc_intJobStat(char *, intJobStat* );