WIP: Switching transaction isolation automatically
This branch uses a single connection for catalog and start a transaction with REPEATABLE-READ or READ-COMMITTED isolation level, based on the first query. If the first query contains SELECT
, REPEATABLE-READ is used. Otherwise READ-COMMITTED is used. For activity tables, READ-COMMITTED is always used.
Some exceptions:
-
z_get_table_schema
: it can be called outside MariaDB transaction and is not couted as 'first SELECT' query. -
z_getitem_by_path
andz_getitem_by_uid
: they are used only at the beginning of indexation, thus we force start READ-COMMITTED transaction.
With this branch, the code compatibility should be mostly kept.
10.4
duration: 11077.6
deadlock: 5329
10.11
duration: 20205.9
deadlock: 129649
11.4
duration: 18263.4
deadlock: 72108
11.4-bis
duration: 9774.21
deadlock: 16775
11.4-unsafe
duration: 9354.08
deadlock: 6055
/cc @vpelletier, @jerome