Monero
Loading...
Searching...
No Matches
MDB_txn Struct Reference
Collaboration diagram for MDB_txn:

Public Attributes

MDB_txnmt_parent
MDB_txnmt_child
pgno_t mt_next_pgno
txnid_t mt_txnid
MDB_envmt_env
MDB_IDL mt_free_pgs
MDB_pagemt_loose_pgs
int mt_loose_count
MDB_IDL mt_spill_pgs
union { 
   MDB_ID2L   dirty_list 
   MDB_reader *   reader 
mt_u
MDB_dbxmt_dbxs
MDB_dbmt_dbs
unsigned int * mt_dbiseqs
MDB_cursor ** mt_cursors
unsigned char * mt_dbflags
MDB_dbi mt_numdbs
unsigned int mt_flags
unsigned int mt_dirty_room

Detailed Description

A database transaction. Every operation requires a transaction handle.

Member Data Documentation

◆ dirty_list

MDB_ID2L MDB_txn::dirty_list

For write txns: Modified pages. Sorted when not MDB_WRITEMAP.

◆ mt_child

MDB_txn* MDB_txn::mt_child

Nested txn under this txn, set together with flag MDB_TXN_HAS_CHILD

◆ mt_cursors

MDB_cursor** MDB_txn::mt_cursors

In write txns, array of cursors for each DB

◆ mt_dbflags

unsigned char* MDB_txn::mt_dbflags

Array of flags for each DB

◆ mt_dbiseqs

unsigned int* MDB_txn::mt_dbiseqs

Array of sequence numbers for each DB handle

◆ mt_dbs

MDB_db* MDB_txn::mt_dbs

Array of MDB_db records for each known DB

◆ mt_dbxs

MDB_dbx* MDB_txn::mt_dbxs

Array of records for each DB known in the environment.

◆ mt_dirty_room

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.

◆ mt_env

MDB_env* MDB_txn::mt_env

the DB environment

◆ mt_flags

unsigned int MDB_txn::mt_flags

◆ mt_free_pgs

MDB_IDL MDB_txn::mt_free_pgs

The list of pages that became unused during this transaction.

◆ mt_loose_count

int MDB_txn::mt_loose_count

Number of loose pages (mt_loose_pgs)

◆ mt_loose_pgs

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).

◆ mt_next_pgno

pgno_t MDB_txn::mt_next_pgno

next unallocated page

◆ mt_numdbs

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.

◆ mt_parent

MDB_txn* MDB_txn::mt_parent

parent of a nested txn

◆ mt_spill_pgs

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.

◆ mt_txnid

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.

◆ [union]

union { ... } MDB_txn::mt_u

◆ reader

MDB_reader* MDB_txn::reader

For read txns: This thread/txn's reader table slot, or NULL.


The documentation for this struct was generated from the following file: