--- Scott Hess <[EMAIL PROTECTED]> wrote:
>  - for newly-created files, create them during the transaction.  If
> the transaction rolls back, delete the file.  If the transaction
> commits, leave them alone.
> 
>  - for deleted files, leave them in place.  If the transaction
> commits, delete the files.  If the transaction rolls back, leave them
> alone.

There's a small window a failure between the successful commit and
deleting the file. If you lose power or crash, the file will be 
processed again upon restarting the process.

> Handling updates could be a challange, as could handling multiple
> inserts and deletes of the same entity within a single transaction.
> As you might guess, this can be an annoying thing to get right!
> 
> If you have full control over the app, the best solution might be to
> periodically run a "BEGIN EXCLUSIVE", then review the filesystem and
> database state and delete any excess files, then run "ROLLBACK".  This
> still doesn't handle conflicts in case someone wants to put a file in
> the same place as an existing deleted file.



       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to