On Sun, Jan 15, 2012 at 3:55 PM, Petter Bergman <
> What will happen if happstack-state can't write an event to disk because
> the disk is full?
Who knows. One of the reasons for a clean rewrite as acid-state is that
happstack-state had too many loose ends like that.
> What will happen in the same situation with acid-state?
One of the things Lemmih worked on in acid-state was ensuring that events
really got flushed to disk. That is the reason why it uses the low-level
posix API for writing files to disk.
The correct behavior when the disk is full is for update transactions to
fail. That is pretty much the only way to handle the 'durability' aspect of
ACID. If we can not successfully flush the event log to disk, then we can
not allow the transaction to complete.
Internally, acid-state uses 'write(2)' to write the transaction to disk (or
something similar on Win32). If the write fails, it will it raise an ERRNO
Still, it is not entirely obvious what the result of that will be. Looking
at the code, I think it means that the 'update' call will never return
because the thread that writes the log will die and never write the mvar
that allows update to return. Obviously.. it might be nicer if the update
function itself raised an exception instead of just blocking? Though
blocking forever (or until happstack kills the request thread) does seem
Hopefully Lemmih can provide a better answer.