jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sch...@apache.org
Subject svn commit: r1302401 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
Date Mon, 19 Mar 2012 12:49:39 GMT
Author: schans
Date: Mon Mar 19 12:49:39 2012
New Revision: 1302401

URL: http://svn.apache.org/viewvc?rev=1302401&view=rev
Log:
JCR-3261: Only perform the extra node id fetch 'trick' for LONGLONG key storage

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java?rev=1302401&r1=1302400&r2=1302401&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
Mon Mar 19 12:49:39 2012
@@ -781,7 +781,7 @@ public class BundleDbPersistenceManager
                 lowId = bigger;
                 keys = getKey(bigger);
             }
-            if (maxCount > 0) {
+            if (getStorageModel() == SM_LONGLONG_KEYS  && maxCount > 0) {
                 // get some more rows, in case the first row is smaller
                 // only required for SM_LONGLONG_KEYS
                 // probability is very low to get get the wrong first key, < 1 : 2^64
@@ -798,11 +798,12 @@ public class BundleDbPersistenceManager
                     long high = rs.getLong(1);
                     long low = rs.getLong(2);
                     current = new NodeId(high, low);
-                }
-                if (lowId != null) {
-                    // skip the keys that are smaller or equal (see above, maxCount += 10)
-                    if (current.compareTo(lowId) <= 0) {
-                        continue;
+                    if (lowId != null) {
+                        // skip the keys that are smaller or equal (see above, maxCount +=
10)
+                        // only required for SM_LONGLONG_KEYS
+                        if (current.compareTo(lowId) <= 0) {
+                            continue;
+                        }
                     }
                 }
                 result.add(current);



Mime
View raw message