jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sch...@apache.org
Subject svn commit: r1302430 - in /jackrabbit/branches/2.4: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
Date Mon, 19 Mar 2012 13:45:49 GMT
Author: schans
Date: Mon Mar 19 13:45:49 2012
New Revision: 1302430

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

Modified:
    jackrabbit/branches/2.4/   (props changed)
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java

Propchange: jackrabbit/branches/2.4/
------------------------------------------------------------------------------
  Merged /jackrabbit/trunk:r1302401

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java?rev=1302430&r1=1302429&r2=1302430&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
Mon Mar 19 13:45:49 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