[Zope-Checkins] CVS: Zope2 - FileStorage.py:1.30.4.1

Jim Fulton jim@korak.digicool.com
Mon, 13 Dec 1999 13:27:32 -0500


Update of /cvs-repository/Zope2/lib/python/ZODB
In directory korak.digicool.com:/projects/users/jim/Zope-2_1_0/lib/python/ZODB

Modified Files:
      Tag: Zope-2_1_0
	FileStorage.py 
Log Message:
On systems where the fsync system call is available, we now call
fsync when commiting transactions to make sure that transaction
data are written to physical storage immediately. There is circumstantial
evidence that database corruption has been caused due to problems with
delayed write of data after Zope has flushed transaction data.

Added logic to avoid writing empty transactions. It's imaginable that
some future application might want to write empty transactions to
capture transaction meta data. If this ever becomes an issue, then
this feature would have to be made optional.

Added flush call in undo.

The following scenario could lead to strange and serious errors:

  - Restart or pack Zope, causing an index to get written

  - Undo some transactions

  - Shutdown Zope ungracefully (e.g. kill, stop script, system crash, ...)

When Zope comes up, the index points to undone records for some
objects. This can lead to all sorts of problems. :(

To overcome this problem, we now remove the index after an
undo.

This increases the likelyhood that it will take longer to restart
next time, but reduces the chance of a bad index.

Fixed a bug in commiting or discarding versions. Some undone transactions
were not handled correctly.