4.12 Transactions
Transaction is a silly thing in this library, because transaction is
used as a hint for memory management. Think about transaction as about “some blocks of some files, which are affected by the transaction”. There are four “levels” ( or flags ) of transactions
- “Null transaction” - a hint for MM, data block is mmaped read-only as default,
read-write as needed.
- “Dirty transaction” - a hint for MM, data block is mmaped read-write and synced in the
time of her last gasp ( before munmap )
- “BI transaction” - same as above, but the content of each block is restored to the “pre-transaction state”, when transaction aborts all blocks afected by transaction are recovered to pre-transaction state.
- “AI transaction” - same as above, the modifications of each block are saved for future
data recovery