Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 | 

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

int

1

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. 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 the following table.

Isolation Level

isolation_level Parameter Value

SERIALIZABLE

"TRAN_SERIALIZABLE" or 6

REPEATABLE READ CLASS with REPEATABLE READ INSTANCES

"TRAN_REP_CLASS_REP_INSTANCE" or "TRAN_REP_READ" or 5

REPEATABLE READ CLASS with READ COMMITTED INSTANCES(or CURSOR STABILITY)

"TRAN_REP_CLASS_COMMIT_INSTANCE" or "TRAN_READ_COMMITTED" or "TRAN_CURSOR_STABILITY" or 4

REPEATABLE READ CLASS with READ UNCOMMITTED INSTANCES

"TRAN_REP_CLASS_UNCOMMIT_INSTANCE" or "TRAN_READ_UNCOMMITTED" or 3

READ COMMITTED CLASS with READ COMMITTED INSTANCES

"TRAN_COMMIT_CLASS_COMMIT_INSTANCE" or 2

READ COMMITTED CLASS with READ UNCOMMITTED INSTANCES

"TRAN_COMMIT_CLASS_UNCOMMIT_INSTANCE" or 1

  • TRAN_SERIALIZABLE : The highest level of consistency can be ensured because concurrency-related problems such as dirty, non-repeatable and phantom reads do not occur.
  • TRAN_REP_CLASS_REP_INSTANCE : It does not read records modified by another transaction, and not perform non-repeatable reads, either. This isolation level does not allow tables or records accessed by the current transaction to be updated by another transaction. However, phantom reads may occur for some records.
  • TRAN_REP_CLASS_COMMIT_INSTANCE : It does not read records modified by other transactions, and not allow tables or records accessed by the current transaction to be updated by another transaction. However, non-repeatable reads may occur for some records.
  • TRAN_REP_CLASS_UNCOMMIT_INSTANCE : It does not read records modified by other transactions, and not allow tables or records accessed by the current transaction to be updated by another transaction. However, dirty reads may occur for uncommitted records.
  • TRAN_COMMIT_CLASS_COMMIT_INSTANCE : It does not read records modified by another transaction. However, this isolation level allows tables or records accessed by the current transaction to be updated by another transaction. Non-repeatable reads may occur.
  • TRAN_COMMIT_CLASS_UNCOMMIT_INSTANCE : It does not read tables modified by another transaction, but reads modified records. Non-repeatable reads for both tables and records may occur.
lock_escalation

lock_escalation is a parameter that configures the maximum number of locks permitted before record locks are extended to table locks. 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 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, some information about lock ownership is included. If it is configured to 2, all information about lock ownership is included.