-
Mar 27th, 2009, 02:54 AM
#1
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
#2
Like this?
http://forum.springframework.org/showthread.php?t=69451
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
#3
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
#4
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
#5
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules