NCBI C++ ToolKit
|
Search Toolkit Book for MDB_txn
A database transaction. More...
Public Attributes | |
MDB_txn * | mt_parent |
parent of a nested txn More... | |
MDB_txn * | mt_child |
Nested txn under this txn, set together with flag MDB_TXN_HAS_CHILD. More... | |
pgno_t | mt_next_pgno |
next unallocated page More... | |
txnid_t | mt_txnid |
The ID of this transaction. More... | |
MDB_env * | mt_env |
the DB environment More... | |
MDB_IDL | mt_free_pgs |
The list of pages that became unused during this transaction. More... | |
MDB_page * | mt_loose_pgs |
The list of loose pages that became unused and may be reused in this transaction, linked through NEXT_LOOSE_PAGE(page). More... | |
int | mt_loose_count |
Number of loose pages (mt_loose_pgs) More... | |
MDB_IDL | mt_spill_pgs |
The sorted list of dirty pages we temporarily wrote to disk because the dirty list was full. More... | |
union { | |
MDB_ID2L dirty_list | |
For write txns: Modified pages. More... | |
MDB_reader * reader | |
For read txns: This thread/txn's reader table slot, or NULL. More... | |
} | mt_u |
MDB_dbx * | mt_dbxs |
Array of records for each DB known in the environment. More... | |
MDB_db * | mt_dbs |
Array of MDB_db records for each known DB. More... | |
unsigned int * | mt_dbiseqs |
Array of sequence numbers for each DB handle. More... | |
MDB_cursor ** | mt_cursors |
In write txns, array of cursors for each DB. More... | |
unsigned char * | mt_dbflags |
Array of flags for each DB. More... | |
MDB_dbi | mt_numdbs |
Number of DB records in use, or 0 when the txn is finished. More... | |
unsigned int | mt_flags |
Transaction Flags More... | |
unsigned int | mt_dirty_room |
dirty_list room: Array size - #dirty pages visible to this txn. More... | |
A database transaction.
Every operation requires a transaction handle.
MDB_ID2L MDB_txn::dirty_list |
For write txns: Modified pages.
Sorted when not MDB_WRITEMAP.
Definition at line 1111 of file mdb.c.
Referenced by mdb_cursor_put(), mdb_dlist_free(), mdb_freelist_save(), mdb_ovpage_free(), mdb_page_dirty(), mdb_page_flush(), mdb_page_get(), mdb_page_loose(), mdb_page_spill(), mdb_page_touch(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), and mdb_txn_renew0().
MDB_txn* MDB_txn::mt_child |
Nested txn under this txn, set together with flag MDB_TXN_HAS_CHILD.
Definition at line 1087 of file mdb.c.
Referenced by mdb_txn_abort(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), and mdb_txn_renew0().
MDB_cursor** MDB_txn::mt_cursors |
In write txns, array of cursors for each DB.
Definition at line 1133 of file mdb.c.
Referenced by mdb_cursor_close(), mdb_cursor_del(), mdb_cursor_del0(), mdb_cursor_open(), mdb_cursor_put(), mdb_cursor_renew(), mdb_cursor_shadow(), mdb_cursors_close(), mdb_del0(), mdb_drop(), mdb_env_open(), mdb_node_move(), mdb_page_merge(), mdb_page_split(), mdb_page_touch(), mdb_pages_xkeep(), mdb_put(), mdb_rebalance(), and mdb_txn_begin().
unsigned char* MDB_txn::mt_dbflags |
Array of flags for each DB.
Definition at line 1135 of file mdb.c.
Referenced by mdb_cursor_init(), mdb_cursor_shadow(), mdb_dbi_open(), mdb_dbis_update(), mdb_drop(), mdb_env_open(), mdb_pages_xkeep(), mdb_stat(), mdb_txn_begin(), mdb_txn_commit(), and mdb_txn_renew0().
unsigned int* MDB_txn::mt_dbiseqs |
Array of sequence numbers for each DB handle.
Definition at line 1120 of file mdb.c.
Referenced by mdb_dbi_open(), mdb_env_open(), mdb_txn_begin(), and mdb_txn_renew0().
MDB_db* MDB_txn::mt_dbs |
Array of MDB_db records for each known DB.
Definition at line 1118 of file mdb.c.
Referenced by mdb_cursor_init(), mdb_cursor_open(), mdb_cursor_shadow(), mdb_dbi_flags(), mdb_dbi_open(), mdb_dbis_update(), mdb_default_cmp(), mdb_del(), mdb_drop(), mdb_env_copyfd1(), mdb_env_open(), mdb_env_write_meta(), mdb_freelist_save(), mdb_page_alloc(), mdb_page_spill(), mdb_pages_xkeep(), mdb_stat(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), and mdb_txn_renew0().
MDB_dbx* MDB_txn::mt_dbxs |
Array of records for each DB known in the environment.
Definition at line 1116 of file mdb.c.
Referenced by mdb_cmp(), mdb_cursor_init(), mdb_dbi_open(), mdb_dcmp(), mdb_default_cmp(), mdb_env_open(), mdb_set_compare(), mdb_set_dupsort(), mdb_set_relctx(), mdb_set_relfunc(), mdb_txn_begin(), and mdb_txn_commit().
unsigned int MDB_txn::mt_dirty_room |
dirty_list room: Array size - #dirty pages visible to this txn.
Includes ancestor txns' dirty pages not hidden by other txns' dirty/spilled pages. Thus commit(nested txn) has room to merge dirty_list into mt_parent after freeing hidden mt_parent pages.
Definition at line 1165 of file mdb.c.
Referenced by mdb_ovpage_free(), mdb_page_alloc(), mdb_page_dirty(), mdb_page_flush(), mdb_page_spill(), mdb_page_unspill(), mdb_txn_begin(), mdb_txn_commit(), and mdb_txn_renew0().
MDB_env* MDB_txn::mt_env |
the DB environment
Definition at line 1094 of file mdb.c.
Referenced by mdb_cursor_put(), mdb_dbi_open(), mdb_dbis_update(), mdb_dlist_free(), mdb_drop(), mdb_env_open(), mdb_env_write_meta(), mdb_find_oldest(), mdb_freelist_save(), mdb_node_add(), mdb_ovpage_free(), mdb_page_alloc(), mdb_page_flush(), mdb_page_get(), mdb_page_malloc(), mdb_page_merge(), mdb_page_new(), mdb_page_spill(), mdb_page_split(), mdb_page_touch(), mdb_page_unspill(), mdb_rebalance(), mdb_stat(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), mdb_txn_env(), mdb_txn_renew(), and mdb_txn_renew0().
unsigned int MDB_txn::mt_flags |
Definition at line 1159 of file mdb.c.
Referenced by mdb_cursor_count(), mdb_cursor_del(), mdb_cursor_del0(), mdb_cursor_get(), mdb_cursor_open(), mdb_cursor_push(), mdb_cursor_put(), mdb_cursor_renew(), mdb_dbi_open(), mdb_del(), mdb_drop(), mdb_drop0(), mdb_env_open(), mdb_freelist_save(), mdb_get(), mdb_node_add(), mdb_ovpage_free(), mdb_page_alloc(), mdb_page_dirty(), mdb_page_get(), mdb_page_loose(), mdb_page_malloc(), mdb_page_search(), mdb_page_search_root(), mdb_page_spill(), mdb_page_split(), mdb_page_touch(), mdb_put(), mdb_stat(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), mdb_txn_renew(), mdb_txn_renew0(), and mdb_txn_reset().
MDB_IDL MDB_txn::mt_free_pgs |
The list of pages that became unused during this transaction.
Definition at line 1097 of file mdb.c.
Referenced by mdb_drop0(), mdb_freelist_save(), mdb_ovpage_free(), mdb_page_loose(), mdb_page_touch(), mdb_rebalance(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), and mdb_txn_renew0().
int MDB_txn::mt_loose_count |
Number of loose pages (mt_loose_pgs)
Definition at line 1103 of file mdb.c.
Referenced by mdb_freelist_save(), mdb_page_alloc(), mdb_page_loose(), mdb_txn_commit(), and mdb_txn_renew0().
MDB_page* MDB_txn::mt_loose_pgs |
The list of loose pages that became unused and may be reused in this transaction, linked through NEXT_LOOSE_PAGE(page).
Definition at line 1101 of file mdb.c.
Referenced by mdb_freelist_save(), mdb_page_alloc(), mdb_page_loose(), mdb_txn_commit(), and mdb_txn_renew0().
pgno_t MDB_txn::mt_next_pgno |
next unallocated page
Definition at line 1088 of file mdb.c.
Referenced by mdb_env_copyfd0(), mdb_env_copyfd1(), mdb_env_write_meta(), mdb_page_alloc(), mdb_page_flush(), mdb_txn_begin(), mdb_txn_commit(), and mdb_txn_renew0().
MDB_dbi MDB_txn::mt_numdbs |
Number of DB records in use, or 0 when the txn is finished.
This number only ever increments until the txn finishes; we don't decrement it when individual DB handles are closed.
Definition at line 1140 of file mdb.c.
Referenced by mdb_cursor_shadow(), mdb_cursors_close(), mdb_dbi_open(), mdb_dbis_update(), mdb_pages_xkeep(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), and mdb_txn_renew0().
MDB_txn* MDB_txn::mt_parent |
parent of a nested txn
Definition at line 1085 of file mdb.c.
Referenced by mdb_ovpage_free(), mdb_page_get(), mdb_page_loose(), mdb_page_spill(), mdb_page_touch(), mdb_page_unspill(), mdb_txn_begin(), mdb_txn_commit(), and mdb_txn_end().
MDB_IDL MDB_txn::mt_spill_pgs |
The sorted list of dirty pages we temporarily wrote to disk because the dirty list was full.
page numbers in here are shifted left by 1, deleted slots have the LSB set.
Definition at line 1108 of file mdb.c.
Referenced by mdb_ovpage_free(), mdb_page_get(), mdb_page_spill(), mdb_page_unspill(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), and mdb_txn_renew0().
txnid_t MDB_txn::mt_txnid |
The ID of this transaction.
IDs are integers incrementing from 1. Only committed write transactions increment the ID. If a transaction aborts, the ID may be re-used by the next writer.
Definition at line 1093 of file mdb.c.
Referenced by mdb_env_write_meta(), mdb_find_oldest(), mdb_freelist_save(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), mdb_txn_id(), mdb_txn_renew(), and mdb_txn_renew0().
union { ... } MDB_txn::mt_u |
MDB_reader* MDB_txn::reader |
For read txns: This thread/txn's reader table slot, or NULL.
Definition at line 1113 of file mdb.c.
Referenced by mdb_txn_end(), and mdb_txn_renew0().