Get the default transaction completion mode.
The returned completion mode is used for calls to tx_commit and tx_abort when DB_DEFAULT_COMPLETION is selected.
The default completion mode is DB_GROUP_COMPLETION.
- Returns:
- The current default transaction completion mode.
- DB_LAZY_COMPLETION: Perform lazy completion.
The transaction status is not written to disk, which may cause the transaction to abort if a crash occurs before the journal is flushed. Call Database::tx_flush to force lazily completed transactions to complete.
- DB_GROUP_COMPLETION: Perform group completion.
The transaction will wait for all other active transactions to be committed and perform the commit for all transactions as a group. This improves performance when several transactions are active at the same time by reducing the amount of disk I/O that is performed. If no other transactions are active, or if 50 milliseconds elapses before the other transactions are committed, the transaction will stop waiting and complete immediately.
Database::tx_commit will not return until the transaction is fully flushed to disk.
- DB_FORCED_COMPLETION: Force completion immediately.
The transaction will be fully flushed to disk before Database::tx_commit returns.
- See also:
- set_default_completion_mode