usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject git commit: Fixes bug with UUID versification
Date Mon, 13 Oct 2014 15:51:11 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o b86641449 -> 43fec6662


Fixes bug with UUID versification


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/43fec666
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/43fec666
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/43fec666

Branch: refs/heads/two-dot-o
Commit: 43fec66623fcf515ee3221dc45f282ad9c333bc3
Parents: b866414
Author: Todd Nine <toddnine@apache.org>
Authored: Mon Oct 13 09:51:02 2014 -0600
Committer: Todd Nine <toddnine@apache.org>
Committed: Mon Oct 13 09:51:02 2014 -0600

----------------------------------------------------------------------
 .../corepersistence/results/FilteringLoader.java       | 13 +++++++++++--
 .../persistence/PerformanceEntityRebuildIndexTest.java |  2 ++
 .../persistence/query/AbstractIteratingQueryIT.java    |  3 +++
 3 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/43fec666/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/FilteringLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/FilteringLoader.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/FilteringLoader.java
index 18cd264..00faefd 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/FilteringLoader.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/FilteringLoader.java
@@ -67,6 +67,13 @@ public class FilteringLoader implements ResultsLoader {
     private final EntityIndexBatch indexBatch;
 
 
+    /**
+     * Create an instance of a filter loader
+     * @param managerCache The manager cache to load
+     * @param resultsVerifier
+     * @param ownerId
+     * @param applicationScope
+     */
     protected FilteringLoader( final CpManagerCache managerCache, final ResultsVerifier resultsVerifier,
                                final EntityRef ownerId, final ApplicationScope applicationScope
) {
         this.managerCache = managerCache;
@@ -152,6 +159,7 @@ public class FilteringLoader implements ResultsLoader {
                         } );
 
                 //deindex this document, and remove the previous maxVersion
+                //we have to deindex this from our ownerId, since this is what gave us the
reference
                 deIndex( indexBatch, ownerId, previousMax );
                 groupedByScopes.remove( collectionType, previousMax );
 
@@ -189,9 +197,10 @@ public class FilteringLoader implements ResultsLoader {
 
             //now using the scope, load the collection
 
-            // Get the collection scope and batch load all the versions
+            // Get the collection scope and batch load all the versions.  We put all entities
in app/app for easy retrieval
+            // unless persistence changes, we never want to read from any scope other than
the app, app, scope name scope
             final CollectionScope collScope = new CollectionScopeImpl( 
-                    applicationScope.getApplication(), ownerId, scopeName );
+                    applicationScope.getApplication(), applicationScope.getApplication(),
scopeName );
 
             final EntityCollectionManager ecm = managerCache.getEntityCollectionManager(
collScope );
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/43fec666/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
index 36113e1..8de520a 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
@@ -21,6 +21,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -59,6 +60,7 @@ import static org.junit.Assert.fail;
 //@RunWith(JukitoRunner.class)
 //@UseModules({ GuiceModule.class })
 @Concurrent()
+@Ignore("Temporary ignore")
 public class PerformanceEntityRebuildIndexTest extends AbstractCoreIT {
     private static final Logger logger = LoggerFactory.getLogger(PerformanceEntityRebuildIndexTest.class
);
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/43fec666/stack/core/src/test/java/org/apache/usergrid/persistence/query/AbstractIteratingQueryIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/AbstractIteratingQueryIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/query/AbstractIteratingQueryIT.java
index 6d65d7c..9989d9d 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/AbstractIteratingQueryIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/AbstractIteratingQueryIT.java
@@ -72,6 +72,9 @@ public abstract class AbstractIteratingQueryIT {
             entity.put( "name", String.valueOf( i ) );
 
             io.writeEntity( entity );
+            //we have to sleep, or we kill embedded cassandra
+            Thread.sleep( 10 );
+
         }
 
         long stop = System.currentTimeMillis();


Mime
View raw message