Next: , Previous: Locking, Up: Internals


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

  1. “Null transaction” - a hint for MM, data block is mmaped read-only as default, read-write as needed.
  2. “Dirty transaction” - a hint for MM, data block is mmaped read-write and synced in the time of her last gasp ( before munmap )
  3. “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.
  4. “AI transaction” - same as above, the modifications of each block are saved for future data recovery