Mar 27th, 2009, 02:54 AM
Rolling back a whole JOB
Let say I start processing record from the db, writing out to file, and writing back to the db for audit purposes.
Lets say something went wrong somewhere in this procedure, Is it possible to roll back the whole job (As if it never happened).
Right now I have a commit interval of 100.
So let say after 20000 items I get an error, can I roll back all 20000, even though they have now been committed?
Mar 27th, 2009, 03:08 AM
It's not a mainstream feature because rolling back an arbitrarily large dataset is *very* expensive. So be careful.
Mar 27th, 2009, 03:30 AM
How would this affect normal chunk oriented rollback and restart semantics, because that is my next step next week.
Mar 27th, 2009, 03:48 AM
It would bypass completely the standard semantics - no point in restartability if you are going to rollback on a failure. Transaction timeout will also be a factor - you need to have a small job for this to make sense.
If that isn't the case then you are going to have to look at a normal set up with compensating transactions. Staging can help as well - prepare everything in a staging area with standard retry and restart semantics, and then bulk copy it in one go if possible when successful.
Mar 27th, 2009, 03:56 AM
my job is definitely too big for this. I will have to think about your "staging idea" that might complicated thing considerably for the job.