June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int lock_detect(DB_ENV *env, u_int32_t flags, u_int32_t atype, int *aborted);
The lock_detect function runs one iteration of the deadlock detector. The deadlock detector traverses the lock table, and marks one of the participating transactions for abort for each deadlock it finds.
The flags value must be set to 0 or by bitwise inclusively OR’ing together one or more of the following values.
DB_LOCK_CONFLICT Only run the deadlock detector if a lock conflict has occurred since the last time that the deadlock detector was run.
The atype parameter specifies which transaction to abort in the case of deadlock. It must be set to one of possible arguments listed for the DBENV→set_lk_detect interface.
If the ...