Skip to content
Snippets Groups Projects
Commit 4d46c8cc authored by Eric Cano's avatar Eric Cano
Browse files

Changed lifecycle of archive and retrieve jobs.

The archive jobs now have 4 states: ToTransfer, Complete, ToReport, Failed.
The ToReport state is special: the last job of the request that completes will get this
state, and get queued to the corresponding report queue. This allows the unpinning of
the file in the disk system for garbage collection. The state is kept at the job level
to not change the ownership model, which is at the job level for the archive requests.

The retrieve requests now have 2 states: ToTransfer, Failed. On completion, the whole
request is deleted. The retrieve request has an implicit state derived from its jobs
and an internal boolean: ToTransfer if an job is to still in this state. If all jobs
are failed, the request as a whole becomes "ToReport" implicitely, and queued to the
corresponding queue. After being reported, the "failure reported" boolean is set and
the request is queued to the failed queue.

This commit implements parts of this scheme:
- The change of statuses.
- The creation of the 3 flavor of queues (to transfer, to report, failed). It should be
  noted that for archivals, the success gets reported, and for retrievals, the failure
  is reported.
- The garbage collection has been adapted.
parent 782d8033
No related branches found
No related merge requests found
Showing
with 599 additions and 409 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment