Does using camunda springboot starter already set transaction isolation level to READ COMMITED?
If i use mysql workbench to conenct to my database and execute:
SELECT @@global.tx_isolation
it shows me “REPEATABLE-READ”. Do I need to change it globally or camunda already set it when opening a new transaction?
@Jean_Robert_Alves you have to set it to globally to READ_COMMITTED as isolation level for MySQL. Camunda doesn’t change any of the db configurations.
-
The Isolation level’s can be set globally or session based on our requirements.
-
A change to global transaction characteristics requires the CONNECTION_ADMIN
or SUPER
privilege. Any session is free to change its session characteristics (even in the middle of a transaction), or the characteristics for its next transaction (prior to the start of that transaction).
-
To set the global isolation level at server startup, use the --transaction-isolation=level
option on the command line or in an option file. Values of level
for this option use dashes rather than spaces, so the permissible values are READ-UNCOMMITTED
, READ-COMMITTED
, REPEATABLE-READ
, or SERIALIZABLE
.
-
Similarly, to set the global transaction access mode at server startup, use the --transaction-read-only
option. The default is OFF
(read/write mode) but the value can be set to ON
for a mode of read only.
SET [GLOBAL | SESSION] TRANSACTION
transaction_characteristic [, transaction_characteristic] ...
transaction_characteristic: {
ISOLATION LEVEL level
| access_mode
}
level: {
REPEATABLE READ
| READ COMMITTED
| READ UNCOMMITTED
| SERIALIZABLE
}
access_mode: {
READ WRITE
| READ ONLY
}
For camunda we need isolation level as ,
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
Then run the below query:
SELECT @@GLOBAL.transaction_isolation, @@GLOBAL.transaction_read_only;
1 Like