Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

Extended Transaction Number Support

The FairCom transaction processing logic used by the FairCom Server uses a system of transaction number high-water marks to maintain consistency between transaction controlled index files and the transaction log files. When log files are erased, the high-water marks maintained in the index headers permit the new log files to begin with transaction numbers which are consistent with the index files.

With previous releases, if the transaction number high-water marks exceed the 4-byte limit of 0x3ffffff0 (1,073,741,808), then the transaction numbers overflow, which will cause problems with the index files. On file open, an error MTRN_ERR (533) is returned if an index file's high-water mark exceeds this limit. If a new transaction causes the system's next transaction number to exceed this limit, the transaction fails with a OTRN_ERR (534).

6-byte transaction numbers essentially eliminate this shortcoming. With this new feature, 70,000,000,000,000 transactions can be performed before server restart. A transaction rate of 1,000 transactions per second would not exhaust the transaction numbers now available for over 2,000 years.

Note: The Xtd8 file create and rebuild functions must be used in order to create files with 6-byte transaction number support. If a non-Xtd8 file create function like CreateIFileXtd() is used to create index files, the index file is created without an extended header, so it cannot support 6-byte transaction numbers.

CreateIFileXtd8(), PermIIndex8(), TempIIndexXtd8(), and RebuildIIfileXtd8() are examples of functions that can be used to create indexes with extended headers.

Even if the specified extended file mode does not include the 6-byte transaction number support flag (ct6BTRAN), c-tree defaults to using that option when a file is created with an extended header.

In c-tree Plus V8 and later, 6-byte transaction numbers are used by default. They will not be used on an individual file creation in the following cases:

  1. If there is no extended create block; or
  2. If the ctNO6BTRAN bit in the x8mode member of the extended file create block (XCREblk) is turned on; or
  3. If the ctNO_XHDRS bit is turned on in x8mode.

You can override the default so that 4-byte transaction numbers are instead used by default by adding the COMPATIBILITY 6BTRAN_NOT_DEFAULT keyword to the server configuration file.

Ordinary data files are unaffected by this modification, and they are compatible back and forth between servers with and without 6-byte transaction support. Except for superfile hosts, the ct6BTRAN mode is ignored for data files. Index files and superfile hosts are sensitive to the ct6BTRAN mode: (1) an existing index file or superfile supporting only 4-byte transaction numbers must be converted or reconstructed to change to 6-byte transaction number support; and (2) the superfile host and all index members of a superfile must agree on their ct6BTRAN mode (either all must have the ct6BTRAN mode on or all must have it off), or a S6BT_ERR (742) occurs on index member creation.

Note: A previously existing index will only use 4-byte transaction numbers and an attempt to go past the (approx.) 1,000,000,000 transaction number limit will result in an OTRN_ERR (534). See Section 3.11.4 “Transaction High Water Marks” in the FairCom DB Programmer’s Reference Guide for more information.

Note: Files supporting 6-byte transactions are not required to be huge, but they do use an extended header.

An attempt to open a file using 6-byte transactions by code that does not support 6-byte transactions will result in HDR8_ERR (672) or FVER_ERR (43).