sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [08/26] sentry git commit: SENTRY-1983: Several commit/rollback errors happen in oracle12c-r1 due to current isolation level (Sergio Pena, reviewed by Alexander Kolbasov)
Date Thu, 19 Oct 2017 08:59:49 GMT
SENTRY-1983: Several commit/rollback errors happen in oracle12c-r1 due to current isolation
level (Sergio Pena, reviewed by Alexander Kolbasov)


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/18634c18
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/18634c18
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/18634c18

Branch: refs/heads/akolb-cli
Commit: 18634c182f7900d3e672113be4282650c31c7a41
Parents: 3d0f470
Author: Sergio Pena <sergio.pena@cloudera.com>
Authored: Fri Oct 13 09:32:35 2017 -0500
Committer: Sergio Pena <sergio.pena@cloudera.com>
Committed: Fri Oct 13 09:32:35 2017 -0500

----------------------------------------------------------------------
 .../provider/db/service/persistent/SentryStore.java      | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/18634c18/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
index 9a37ac8..f4d84d2 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
@@ -220,10 +220,9 @@ public class SentryStore {
     prop.setProperty(ServerConfig.JAVAX_JDO_DRIVER_NAME, driverName);
 
     /*
-     * Oracle doesn't support "repeatable-read" isolation level, so we use* "serializable"
instead. This should be handled by Datanucleus, but it
-     * incorrectly states that "repeatable-read" is supported and Oracle barks
-     * at run-time. This code is a hack, but until it is fixed in Datanucleus
-     * we can't do much.
+     * Oracle doesn't support "repeatable-read" isolation level and testing
+     * showed issues with "serializable" isolation level for Oracle 12,
+     * so we use "read-committed" instead.
      *
      * JDBC URL always looks like jdbc:oracle:<drivertype>:@<database>
      *  we look at the second component.
@@ -236,9 +235,9 @@ public class SentryStore {
                     jdbcUrl.contains(oracleDb)) {
       String[] parts = jdbcUrl.split(":");
       if ((parts.length > 1) && parts[1].equals(oracleDb)) {
-        // For Oracle JDBC driver, replace "repeatable-read" with "serializable"
+        // For Oracle JDBC driver, replace "repeatable-read" with "read-committed"
         prop.setProperty(ServerConfig.DATANUCLEUS_ISOLATION_LEVEL,
-                "serializable");
+                "read-committed");
       }
     }
 


Mime
View raw message