NCBI C++ ToolKit
Public Attributes | List of all members
MDB_rxbody Struct Reference

Search Toolkit Book for MDB_rxbody

The information we store in a single slot of the reader table. More...

+ Collaboration diagram for MDB_rxbody:

Public Attributes

volatile txnid_t mrb_txnid
 Current Transaction ID when this transaction began, or (txnid_t)-1. More...
 
volatile pid_t mrb_pid
 The process ID of the process owning this reader txn. More...
 
volatile pthread_t mrb_tid
 The thread ID of the thread owning this txn. More...
 

Detailed Description

The information we store in a single slot of the reader table.

In addition to a transaction ID, we also record the process and thread ID that owns a slot, so that we can detect stale information, e.g. threads or processes that went away without cleaning up.

Note
We currently don't check for stale records. We simply re-init the table when we know that we're the only process opening the lock file.

Definition at line 686 of file mdb.c.

Member Data Documentation

◆ mrb_pid

volatile pid_t MDB_rxbody::mrb_pid

The process ID of the process owning this reader txn.

Definition at line 696 of file mdb.c.

◆ mrb_tid

volatile pthread_t MDB_rxbody::mrb_tid

The thread ID of the thread owning this txn.

Definition at line 698 of file mdb.c.

◆ mrb_txnid

volatile txnid_t MDB_rxbody::mrb_txnid

Current Transaction ID when this transaction began, or (txnid_t)-1.

Multiple readers that start at the same time will probably have the same ID here. Again, it's not important to exclude them from anything; all we need to know is which version of the DB they started from so we can avoid overwriting any data used in that particular version.

Definition at line 694 of file mdb.c.


The documentation for this struct was generated from the following file:
Modified on Fri Sep 20 14:57:31 2024 by modify_doxy.py rev. 669887