Skip to content

Commit

Permalink
dcache-bulk: remove redundant update of request target in container s…
Browse files Browse the repository at this point in the history
…tart

Motivation:

The start method on the container manager is updating
the state of the root job twice (`job.update`
already calls `targetStore.update`).

Modification:

Remove the redunandant call to the target store.
RuntimeException handling is left in place so
that an unexpected exception does not kill
the manager thread.

Result:

Update is called only once.

No visible change for user.

Target: master
Request: 8.2
Patch: https://rb.dcache.org/r/13794/
Requires-notes: no
Acked-by: Tigran
  • Loading branch information
alrossi committed Nov 30, 2022
1 parent 771db06 commit 0d9397f
Showing 1 changed file with 0 additions and 3 deletions.
Expand Up @@ -503,11 +503,8 @@ void startJob(AbstractRequestContainerJob job) {
try {
if (isJobValid(job)) { /* possibly cancelled in flight */
job.update(State.RUNNING);
targetStore.update(id, State.RUNNING, null);
job.getActivity().getActivityExecutor().submit(new FireAndForgetTask(job));
}
} catch (BulkStorageException e) {
LOGGER.error("updateJobState", e.toString());
} catch (RuntimeException e) {
job.getTarget().setErrorObject(e);
job.cancel();
Expand Down

0 comments on commit 0d9397f

Please sign in to comment.