Files deleted from a task, but only when running multiple Jobs
book
Article ID: KB0086270
calendar_today
Updated On:
Products
Versions
TIBCO DataSynapse GridServer
-
Not Applicable
-
Description
Resolution: When running multiple Jobs, files from a task may be deleted.
If you are using the destroy() method of the tasklet or service to clean up files at the end of a Job, bear in mind that this could interfere with other running Jobs. destroy() is not only called at the end of the Job, but also whenever the tasklet is removed from memory, which could happen at any time (except when the tasklet is actually running) for a variety of reasons, such as JVM garbage collection. If destroy() is called on the tasklet for Job 1 while Job 2's tasklet is running, and a common directory is used for both Jobs, then the files that the second tasklet is accessing could be inadvertently removed..
To avoid this, use the DataSynapse worker temp directory, which is periodically cleaned; use separate directories for each Job; or delete the files in the init or service methods, which are called at well-defined times.
Issue/Introduction
Files deleted from a task, but only when running multiple Jobs