jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1430284 - in /jackrabbit/oak/trunk/oak-mongomk/src: main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java test/java/org/apache/jackrabbit/mongomk/impl/MongoMKBranchTest.java
Date Tue, 08 Jan 2013 13:52:35 GMT
Author: mreutegg
Date: Tue Jan  8 13:52:35 2013
New Revision: 1430284

URL: http://svn.apache.org/viewvc?rev=1430284&view=rev
Log:
OAK-542: MongoMK.getNodes() may return changes from other unmerged branch 

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

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=1430284&r1=1430283&r2=1430284&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
Tue Jan  8 13:52:35 2013
@@ -147,7 +147,10 @@ public class FetchNodesActionNew extends
 
             DBObject branchQuery = QueryBuilder.start().or(
                     QueryBuilder.start(MongoNode.KEY_BRANCH_ID).is(branchId).get(),
-                    QueryBuilder.start(MongoNode.KEY_REVISION_ID).lessThanEquals(headBranchRevisionId).get()
+                    QueryBuilder.start().and(
+                            QueryBuilder.start(MongoNode.KEY_REVISION_ID).lessThanEquals(headBranchRevisionId).get(),
+                            new BasicDBObject(MongoNode.KEY_BRANCH_ID, new BasicDBObject("$exists",
false))
+                    ).get()
             ).get();
             queryBuilder = queryBuilder.and(branchQuery);
         }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKBranchTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKBranchTest.java?rev=1430284&r1=1430283&r2=1430284&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKBranchTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKBranchTest.java
Tue Jan  8 13:52:35 2013
@@ -46,7 +46,6 @@ public class MongoMKBranchTest extends B
      * the version from the first commit.
      */
     @Test
-    @Ignore("OAK-542")
     public void isolatedBranches() throws Exception {
         String rev1 = mk.commit("", "+\"/child1\":{}", null, "");
 



Mime
View raw message