cancel
Showing results for 
Search instead for 
Did you mean: 

Background processes do they continue on Alfresco restart?

ashokharnal
Champ in-the-making
Champ in-the-making
I am uploading a large number (around 3000) of huge files (each between 100-350MB) in Alfresco
using 'smbclient'. On each inbound file certain rules will apply  as background processes
(for example, rule for metadata extraction).

Suppose background processes are still to work upon some files but meanwhile Alfresco is
stopped using 'alfresco.sh' file available in its home folder. When Alfresco is restarted will background
processes restart and work upon the rest of the files? If not, then is there a way to know
as to upon which files background processes are still to apply?

I am using version 3.4.d.

I shall be grateful for a reply.
4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator
Hello,

it depends on the kind of background processes wether they are able to survive a restart of Alfresco. Most have not specifically been designed to survive a restart, as this is a rather deliberate and interuptive action, which is uncommon for a production environment.

In general, the following assumptions can be made:
* synchronous rules / actions (e.g. metadata extraction) are interrupted and their transaction rolled back (not restarted) - including the part where a content item was uploaded / modified
* asynchronous rules / actions are interrupted and their transaction rolled back (not restarted) - the content modification remains intact, but suspension of the rules / actions may result in a inconsistent state
* scheduled rules / actions are interrupted and their transaction rolled back - scheduled actions may be automatically re-run after startup depending on their schedule

As to finding out which elements still need actions / rules to apply: this depends on the rule / action in question and may be difficult or even impossible to identify, depending the conditions before / after the rule / action was executed.

Regards
Axel

ashokharnal
Champ in-the-making
Champ in-the-making
Thanks for the reply. It clears many doubts.

May I ask one more query. Suppose a background process is to trigger every 15 minutes. But as the workload
is high, the process is unable to complete its work within 15 minutes when it is time to trigger the same
process again. Will Alfresco allow nested process or delay/cancel its start as the earlier process is still
continuing? Can something be done to postpone its start?

Ashok Kumar Harnal

afaust
Legendary Innovator
Legendary Innovator
Hello,

if Alfresco is told to trigger a (Quartz) job every 15 minutes it will trigger that job at precisely that interval - it is up to the job to handle concurrent executions properly (e.g. use JobLockService internally). More or less the same applies to scheduled actions. In contrast to the job, who must be able to detect and deal with concurrent execution (e.g. ignore the second trigger if the first one is still executing), an action need not be aware of this - you can use a subclass AbstractAsynchronousActionFilter to enable Alfresco to tell which actions are the same, so it will drop any further invocations as long as one is still running.

Regards
Axel

ashokharnal
Champ in-the-making
Champ in-the-making
Thanks for a very informed reply.

Ashok Kumar Harnal