Skip to content

Commit

Permalink
Set trans. isolation to READ_COMMITTED (Oracle)
Browse files Browse the repository at this point in the history
This avoids ORA-8177 errors present in single-thread scenarios
yet does not harm org closure computations as they are executed
with the M_ORG_CLOSURE_TABLE being locked.
  • Loading branch information
mederly committed Jun 1, 2018
1 parent 5844da9 commit dfdc021
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -415,7 +415,17 @@ private void computeDefaultConcurrencyParameters() {
defaultLockForUpdateViaSql = true;
defaultUseReadOnlyTransactions = true;
} else if (isUsingOracle()) {
defaultTransactionIsolation = TransactionIsolation.SERIALIZABLE;
/*
* Isolation of SERIALIZABLE causes false ORA-8177 (serialization) exceptions even for single-thread scenarios
* since midPoint 3.8 and/or Oracle 12c (to be checked more precisely).
*
* READ_COMMITTED is currently a problem for MySQL and PostgreSQL because of org closure conflicts. However,
* in case of Oracle (and SQL Server and H2) we explicitly lock the whole M_ORG_CLOSURE_TABLE during closure
* updates. Therefore we can use READ_COMMITTED isolation for Oracle.
*
* (This is maybe the optimal solution also for other databases - to be researched later.)
*/
defaultTransactionIsolation = TransactionIsolation.READ_COMMITTED;
defaultLockForUpdateViaHibernate = false;
defaultLockForUpdateViaSql = true;
defaultUseReadOnlyTransactions = true;
Expand Down

0 comments on commit dfdc021

Please sign in to comment.