Concurrency/Lock Parameters

The following are parameters related to concurrency control and locks of the Database Server. The type and value range for each parameter are as follows:

Parameter Name

Type

Default Value

Min

Max

deadlock_detection_interval_in_secs

float

1.0

0.1

isolation_level

int

3

1

6

lock_escalation

int

100000

5

lock_timeout_in_secs

int

-1

-1

lock_timeout_message_type

int

0

0

2

deadlock_detection_interval_in_secs

deadlock_detection_interval_in_secs is a parameter that configures the interval (in seconds) in which deadlocks are detected for stopped transactions. If a deadlock occurs, CUBRID resolves the problem by rolling back one of the transactions. The default value is 1 second and the minimum value is 0.1 second. This value is rounded up by 0.1 sec. unit. For example, if an input value is 0.12 seconds, the value is rounded up to 0.2 seconds. Note that deadlocks cannot be detected if the detection interval is too long.

isolation_level

isolation_level is a parameter that configures the isolation level of a transaction. The higher the isolation level, the less concurrency and the less interruption by other concurrent transactions. The isolation_level parameter can be configured to an integer value from 1 to 6, which represent isolation levels, or character strings. The default value is TRAN_REP_CLASS_UNCOMMIT_INSTANCE. For details about each isolation level and parameter values, see Setting Isolation Level and the following table.

lock_escalation

lock_escalation is a parameter that specifies the maximum number of locks permitted before row level locking is extended to table level locking. The default value is 100,000. If the value of the lock_escalation parameter is small, the overhead by memory lock management is small as well; however, the concurrency decreases. On the other hand, if the configured value is large, the overhead is large as well; however, the concurrency increases.

lock_timeout_in_secs

lock_timeout_in_secs is a client parameter that configures the lock waiting time. If the lock is not permitted within the specified time period, the given transaction is canceled, and an error message is returned. If the parameter is configured to -1, which is the default value, the waiting time is infinite until the lock is permitted. If it is configured to 0, there is no waiting for locks.

lock_timeout_message_type

lock_timeout_message_type is a parameter that configures the level of information that is to be included in the message returned when a lock timeout occurs. If the parameter is configured to 0, which is the default value, the information about lock ownership is not included in the message. If it is configured to 1, single lock ownership information is included. If it is configured to 2, all information about lock ownership is included.

If lock_timeout_message_type = 0

ERROR: Your transaction (index 3, cub_user@cdbs006.cub|15668) timed out waiting on X_LOCK lock on instance 0|636|34 of class participant. You are waiting for user(s) to finish.