Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic


Indicates if session-wide record locking is currently active.


CTBOOL ctdbIsLockActive(CTHANDLE Handle)


ctdbIsLockActive() indicates if session-wide record locking is currently active. Session-wide record locking is active/enabled if a call to ctdbLock(), with one of the READ or WRITE segment mode variations, has been made. The lock active flag is cleared with a call to ctdbUnlock() or with a call to ctdbLock() with the lock mode set to CTLOCK_FREE or CTLOCK_SUSPEND. Ending a transaction via calls to ctdbCommit() or ctdbUnlock() will also clear the lock active flag. This function does not verify if a call to ctdbLockRecord() was made because ctdbIsLockActive() does not check the lock status of individual records. To do that, use ctdbGetRecordLock().

  • Handle [in] the Session or any other Handle.


ctdbIsLockActive() returns YES if the session-wide record locking mode is one of the READ or WRITE variations, NO otherwise.


if (ctdbIsLockActive(pSession))


See also

ctdbLock(), ctdbUnlock(), ctdbGetLockMode(), ctdbLockRecord(), Locking