Paolo,

It is to do with closing ... in fact, being too neat and tidy on closing.

Nodes are written inside the transaction - the data goes to the NodeTableTrans journal file, which is an ObjectFileStorage.

nodeTableJournal.close() is going to call journal.close so whether nodeTableJournal.close or direct journal.close is called does not matter much.

What does matter is that when ObjectFileStorage is gracefully closed, it flushes to disk. ObjectFileStorage has a write buffer (dft 8K).

There is data in it from the transaction which is calling abort. In a large transaction, the buffer may have flushed anyway.

Result: bytes are written to the journal on disk on abort or before.  Oops.

The design does allow for reuse of data journals (not used) so journals are not cleared at transaction start.

Solution: truncate the file before closing, no data written and any data already written is removed.

To allow for concatenated use of the file, the start point in journal on each transaction begin is recorded and on abort, the system truncates to that point.

2* TestTransSystem (mem and disk) running in the background as I type.

        Andy

Reply via email to