You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/10/10 23:41:01 UTC
[1/2] git commit: Temporary commit. Removes version checking.
Something is not quite right with our entity log writes.
Repository: incubator-usergrid
Updated Branches:
refs/heads/two-dot-o 693cb2d0e -> 884b0300d
Temporary commit. Removes version checking. Something is not quite right with our entity log writes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/8f897cb1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/8f897cb1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/8f897cb1
Branch: refs/heads/two-dot-o
Commit: 8f897cb117dcc144a3d609a25797f283e39b3456
Parents: 389e766
Author: Todd Nine <to...@apache.org>
Authored: Fri Oct 10 15:40:43 2014 -0600
Committer: Todd Nine <to...@apache.org>
Committed: Fri Oct 10 15:40:43 2014 -0600
----------------------------------------------------------------------
.../corepersistence/CpRelationManager.java | 3 ++-
.../usergrid/corepersistence/CpWalker.java | 5 +++++
.../results/FilteringLoader.java | 13 ++++---------
.../results/VersionVerifier.java | 20 ++++++++++----------
.../PerformanceEntityRepersistTest.java | 3 ++-
.../MvccEntitySerializationStrategyImpl.java | 2 +-
6 files changed, 24 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8f897cb1/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
index bac085c..237fe01 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
@@ -617,8 +617,9 @@ public class CpRelationManager implements RelationManager {
EntityCollectionManager memberMgr = managerCache.getEntityCollectionManager(memberScope);
+ //TODO, this double load should disappear once events are in
org.apache.usergrid.persistence.model.entity.Entity memberEntity = memberMgr.load(
- new SimpleId( itemRef.getUuid(), itemRef.getType() )).toBlockingObservable().last();
+ new SimpleId( itemRef.getUuid(), itemRef.getType() )).toBlocking().last();
if ( memberEntity == null ) {
throw new RuntimeException("Unable to load entity uuid="
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8f897cb1/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpWalker.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpWalker.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpWalker.java
index e780b77..a0bcd64 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpWalker.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpWalker.java
@@ -92,6 +92,11 @@ public class CpWalker {
applicationScope.getApplication().getUuid()
});
+
+ Observable<String> edgeTypes = gm.getEdgeTypesFromSource( new SimpleSearchEdgeType(fromEntityId, CpNamingUtils.EDGE_COLL_SUFFIX, null ));
+
+
+
Observable<Edge> edges = gm.loadEdgesFromSource( new SimpleSearchByEdgeType(
fromEntityId, edgeType, Long.MAX_VALUE,
SearchByEdgeType.Order.DESCENDING, null ));
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8f897cb1/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 4973783..007b307 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
@@ -112,7 +112,7 @@ public class FilteringLoader implements ResultsLoader {
*/
/**
- * Go through the candidates and group them by scope for more efficient retrieval
+ * Go through the candidates and group them by scope for more efficient retrieval. Also remove duplicates before we even make a network call
*/
for ( int i = 0; iter.hasNext(); i++ ) {
@@ -178,11 +178,8 @@ public class FilteringLoader implements ResultsLoader {
@Nullable
@Override
public Id apply( @Nullable final CandidateResult input ) {
- if ( input == null ) {
- return null;
- }
-
- return input.getId();
+ //NOTE this is never null, we won't need to check
+ return input.getId();
}
} );
@@ -222,9 +219,7 @@ public class FilteringLoader implements ResultsLoader {
}
- //execute the cleanup
-// indexBatch.execute();
-
+ //NOTE DO NOT execute the batch here. It changes the results and we need consistent paging until we aggregate all results
return resultsVerifier.getResults( sortedResults.values() );
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8f897cb1/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/VersionVerifier.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/VersionVerifier.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/VersionVerifier.java
index 94a36af..4133227 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/VersionVerifier.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/VersionVerifier.java
@@ -65,16 +65,16 @@ public abstract class VersionVerifier implements ResultsVerifier {
return false;
}
- final UUID savedVersion = version.getVersion();
-
- if ( UUIDComparator.staticCompare( savedVersion, candidateResult.getVersion() ) > 0 ) {
- logger.debug( "Stale version of Entity uuid:{} type:{}, stale v:{}, latest v:{}",
- new Object[] {
- entityId.getUuid(), entityId.getType(), savedVersion, candidateResult.getVersion()
- } );
-
- return false;
- }
+// final UUID savedVersion = version.getVersion();
+//
+// if ( UUIDComparator.staticCompare( savedVersion, candidateResult.getVersion() ) > 0 ) {
+// logger.debug( "Stale version of Entity uuid:{} type:{}, stale v:{}, latest v:{}",
+// new Object[] {
+// entityId.getUuid(), entityId.getType(), candidateResult.getVersion(), savedVersion
+// } );
+//
+// return false;
+// }
return true;
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8f897cb1/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRepersistTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRepersistTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRepersistTest.java
index 5b4cccc..48d6e7a 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRepersistTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRepersistTest.java
@@ -118,7 +118,8 @@ public class PerformanceEntityRepersistTest extends AbstractCoreIT {
List<EntityRef> entityRefs = new ArrayList<EntityRef>();
int entityCount = 0;
- while ( System.currentTimeMillis() < stopTime ) {
+ int i = 0;
+ while ( i++ < 10 ) {
final Entity entity;
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8f897cb1/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
index 8f51cbc..31c26a9 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
@@ -153,7 +153,7 @@ public class MvccEntitySerializationStrategyImpl implements MvccEntitySerializat
Preconditions.checkNotNull( maxVersion, "version is required" );
- //didnt put the max in the error message, I don't want to take the string construction hit every time
+ //didn't put the max in the error message, I don't want to take the string construction hit every time
Preconditions.checkArgument( entityIds.size() <= serializationFig.getMaxLoadSize(), "requested size cannot be over configured maximum");
[2/2] git commit: Merge branch 'two-dot-o' of
https://git-wip-us.apache.org/repos/asf/incubator-usergrid into two-dot-o
Posted by to...@apache.org.
Merge branch 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into two-dot-o
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/884b0300
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/884b0300
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/884b0300
Branch: refs/heads/two-dot-o
Commit: 884b0300dc8289d81279c7b1309bb1b1fed92796
Parents: 8f897cb 693cb2d
Author: Todd Nine <to...@apache.org>
Authored: Fri Oct 10 15:40:55 2014 -0600
Committer: Todd Nine <to...@apache.org>
Committed: Fri Oct 10 15:40:55 2014 -0600
----------------------------------------------------------------------
.../main/java/org/apache/usergrid/services/ServiceManager.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------