jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meteata...@apache.org
Subject svn commit: r1421362 - in /jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action: FetchNodesAction.java FetchNodesActionNew.java
Date Thu, 13 Dec 2012 16:21:52 GMT
Author: meteatamel
Date: Thu Dec 13 16:21:51 2012
New Revision: 1421362

URL: http://svn.apache.org/viewvc?rev=1421362&view=rev
Log:
Include path in the orderBy of fetch nodes query, otherwise Mongo complains that there is
too much data for sort.

Modified:
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java?rev=1421362&r1=1421361&r2=1421362&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java
Thu Dec 13 16:21:51 2012
@@ -150,7 +150,10 @@ public class FetchNodesAction extends Ba
             queryBuilder = queryBuilder.and(branchQuery);
         }
 
-        DBObject orderBy = new BasicDBObject(MongoCommit.KEY_REVISION_ID, -1);
+        DBObject orderBy = new BasicDBObject();
+        orderBy.put(MongoNode.KEY_PATH, 1);
+        orderBy.put(MongoNode.KEY_REVISION_ID, -1);
+
         DBObject query = queryBuilder.get();
         LOG.debug("Executing query: {}", query);
 

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java?rev=1421362&r1=1421361&r2=1421362&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java
Thu Dec 13 16:21:51 2012
@@ -136,7 +136,10 @@ public class FetchNodesActionNew extends
             queryBuilder = queryBuilder.and(branchQuery);
         }
 
-        DBObject orderBy = new BasicDBObject(MongoCommit.KEY_REVISION_ID, -1);
+        DBObject orderBy = new BasicDBObject();
+        orderBy.put(MongoNode.KEY_PATH, 1);
+        orderBy.put(MongoNode.KEY_REVISION_ID, -1);
+
         DBObject query = queryBuilder.get();
         LOG.debug("Executing query: {}", query);
 



Mime
View raw message