sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vam...@apache.org
Subject [06/52] [abbrv] sentry git commit: CDH-49587: Configuring SENTRY failing on clusters with oracle12c-r1 database
Date Wed, 14 Jun 2017 00:56:44 GMT
CDH-49587: Configuring SENTRY failing on clusters with oracle12c-r1 database

- Changed the transaction isolation level for Oracle only back to read-committed

Change-Id: I460682a1a5bb420e2b13871fbd16c0137ce62e23
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/22221
Tested-by: Jenkins User
Reviewed-by: Alexander Kolbasov <akolb@cloudera.com>


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

Branch: refs/for/cdh5-1.5.1_ha
Commit: fa62e496fdd9ccaf3aea6e99ac17863a354afff4
Parents: ae2589d
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Mon May 1 21:24:43 2017 -0700
Committer: Alexander Kolbasov <akolb@cloudera.com>
Committed: Mon May 1 22:07:01 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/sentry/blob/fa62e496/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 98fc1c9..fb648bb 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
@@ -177,11 +177,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.
@@ -194,9 +192,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