set_lk_detect
Sets whether the deadlock detector is to be run whenever a lock conflict occurs, and specifies which lock request(s) should be rejected. Because transactions acquire locks on behalf of a single locker ID, rejecting a lock request associated with a transaction normally requires that the transaction be aborted.
The syntax of this parameter in the DB_CONFIG file is a single line with the string set_lk_detect, one or more whitespace characters, and the method detect parameter as a string. The detect parameter configures the deadlock detector. The deadlock detector will reject the lock request with the lowest priority. If multiple lock requests have the lowest priority, then the detect parameter is used to select which of those lock requests to reject.
For example:
set_lk_detect DB_LOCK_OLDESTSets the deadlock detector such that the lock request for the locker ID with the oldest lock is rejected.
The detect parameter values are:
- DB_LOCK_DEFAULT
- DB_LOCK_EXPIRE
- DB_LOCK_MAXLOCKS
- DB_LOCK_MAXWRITE
- DB_LOCK_MINLOCKS
- DB_LOCK_MINWRITE
- DB_LOCK_OLDEST
- DB_LOCK_RANDOM
- DB_LOCK_YOUNGEST
For more information, see DB_ENV->set_lk_detect().