head 1.2; access; symbols RPM_4_2_1:1.1.1.5 RPM_4_2:1.1.1.5 RPM_4_1_1:1.1.1.5 RPM_4_1:1.1.1.4 RPM_4_0_5:1.1.1.3 RPM_4_0_4:1.1.1.2 RPM_4_0_3:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.55.52; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.07.23.20.45.38; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.23.20.45.38; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.08.00.30.12; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.49.04; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.07.23.20.09.19; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.05.00; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @ Berkeley DB Reference Guide: Transaction limits

Berkeley DB Reference Guide:
Transaction Subsystem

PrevRefNext

Transaction limits

Transaction IDs

Transactions are identified uniquely by 32-bit unsigned integers. The high-order bit of the transaction ID is reserved (and defined to be 1), resulting in just over two billion unique transaction IDs. Each time that recovery is run, the beginning transaction ID is reset with new transactions being numbered, starting from 1. This means that recovery must be run at least once every two billion transactions.

It is possible that some environments may need to be aware of this limitation. Consider an application performing 600 transactions a second for 15 hours a day. The transaction ID space will run out in roughly 66 days:

2^31 / (600 * 15 * 60 * 60) = 66

Doing only 100 transactions a second exhausts the transaction ID space in roughly one year.

The transaction ID name space is initialized each time a database environment is created or recovered. If you reach the end of the transaction ID name space, it must be handled as if an application or system failure occurred. The most recently allocated transaction ID is the st_last_txnid value in the transaction statistics information, and is displayed by the db_stat utility.

Cursors

When using transactions, cursors are localized to a single transaction. That is, a cursor may not span transactions, and must be opened and closed within a single transaction. In addition, intermingling transaction-protected cursor operations and non-transaction-protected cursor operations on the same database in a single thread of control is practically guaranteed to deadlock because the locks obtained for transactions and non-transactions can conflict.

Multiple Threads of Control

Because transactions must hold all their locks until commit, a single transaction may accumulate a large number of long-term locks during its lifetime. As a result, when two concurrently running transactions access the same database, there is strong potential for conflict. Although Berkeley DB allows an application to have multiple outstanding transactions active within a single thread of control, great care must be taken to ensure that the transactions do not block each other (for example, attempt to obtain conflicting locks on the same data). If two concurrently active transactions in the same thread of control do encounter a lock conflict, the thread of control will deadlock so that the deadlock detector cannot detect the problem. In this case, there is no true deadlock, but because the transaction on which a transaction is waiting is in the same thread of control, no forward progress can be made.

PrevRefNext

Copyright Sleepycat Software @ 1.1 log @Initial revision @ text @d1 1 a1 1 @ 1.1.1.1 log @Import: RPM 4.0.3 @ text @@ 1.1.1.2 log @Import: RPM 4.0.4 @ text @d1 1 a1 1 @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d1 2 a2 2 a3 1 d14 1 a14 1 PrevRefNext d19 19 a37 9

Transactions are identified by 31-bit unsigned integers, which means there are just over two billion unique transaction IDs. When a database environment is initially created or recovery is run, the transaction ID name space is reset, and new transactions are numbered starting from 0x80000000 (2,147,483,648). The IDs will wrap if the maximum transaction ID is reached, starting again from 0x80000000. The most recently allocated transaction ID is the st_last_txnid value in the transaction statistics information, and can be displayed by the db_stat utility. d61 1 a61 1

PrevRefNext @ 1.1.1.4 log @Import: RPM 4.1 @ text @d1 2 a2 2 d4 1 d15 1 a15 1 PrevRefNext d20 9 a28 19

Transactions are identified uniquely by 32-bit unsigned integers. The high-order bit of the transaction ID is reserved (and defined to be 1), resulting in just over two billion unique transaction IDs. Each time that recovery is run, the beginning transaction ID is reset with new transactions being numbered, starting from 1. This means that recovery must be run at least once every two billion transactions.

It is possible that some environments may need to be aware of this limitation. Consider an application performing 600 transactions a second for 15 hours a day. The transaction ID space will run out in roughly 66 days:

2^31 / (600 * 15 * 60 * 60) = 66

Doing only 100 transactions a second exhausts the transaction ID space in roughly one year.

The transaction ID name space is initialized each time a database environment is created or recovered. If you reach the end of the transaction ID name space, it must be handled as if an application or system failure occurred. The most recently allocated transaction ID is the st_last_txnid value in the transaction statistics information, and is displayed by the db_stat utility. d52 1 a52 1

PrevRefNext @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d1 2 a2 2 a3 1 d14 1 a14 1 PrevRefNext d19 19 a37 9

Transactions are identified by 31-bit unsigned integers, which means there are just over two billion unique transaction IDs. When a database environment is initially created or recovery is run, the transaction ID name space is reset, and new transactions are numbered starting from 0x80000000 (2,147,483,648). The IDs will wrap if the maximum transaction ID is reached, starting again from 0x80000000. The most recently allocated transaction ID is the st_last_txnid value in the transaction statistics information, and can be displayed by the db_stat utility. d61 1 a61 1

PrevRefNext @