Product Documentation

V9 Update Guide

Previous Topic

Next Topic

Retain Locks After Commit

By default, the c-treeDB begin transaction function, ctdbBegin(), will begin a transaction by invoking c-tree’s TRANBEG() function with the ctTRNLOG and ctENABLE_BLK modes set. If the TRANBEG() function succeeds, c-treeDB’s ctdbBegin() function automatically calls LKISAM() to suspend locks enabled by TRANBEG(), allowing users to enable any locks they wish: read locks, write locks, blocking or non-blocking. In this case, the c-treeDB commit or abort transaction functions, ctdbCommit() and ctdbAbort(), call the appropriate c-tree ISAM functions to terminate the transaction and free all locks.

A new feature was added to allow customization in the way these locks are handled by c-treeDB’s begin and end transaction functions.

c-treeDB C API

  • ctdbGetKeepLock() - returns the FairCom DB Keep Lock mode.
  • ctdbSetKeepLock() - sets the FairCom DB Keep Lock mode.

c-treeDB C++ API

  • CTBase::GetKeepLock() - returns the FairCom DB Keep Lock mode.
  • CTBase::SetKeepLock() - sets the FairCom DB Keep Lock mode.

TOCIndex