usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject usergrid git commit: Added some fixes to read repair.
Date Thu, 12 Nov 2015 17:31:52 GMT
Repository: usergrid
Updated Branches:
  refs/heads/readRepairForIndexValues b38f5bcb4 -> 1d89dbb69


Added some fixes to read repair.


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

Branch: refs/heads/readRepairForIndexValues
Commit: 1d89dbb69fb260f450aa5ac3f43e70c8a095ed85
Parents: b38f5bc
Author: George Reyes <grey@apache.org>
Authored: Thu Nov 12 09:31:50 2015 -0800
Committer: George Reyes <grey@apache.org>
Committed: Thu Nov 12 09:31:50 2015 -0800

----------------------------------------------------------------------
 .../apache/usergrid/persistence/cassandra/EntityManagerImpl.java   | 2 +-
 .../test/java/org/apache/usergrid/services/ServiceRequestIT.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/1d89dbb6/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
index bd7773a..ea8c28e 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
@@ -593,7 +593,7 @@ public class EntityManagerImpl implements EntityManager {
                 }
             }
             //this means that the same unique rowkey has two values associated with it
-            if(entities[0]!=null && entities[1]!=null){
+            if(index>1){
                 Entity mostRecentEntity = entities[0];
                 for(Entity entity: entities){
                     if(mostRecentEntity.getModified() > entity.getModified()){

http://git-wip-us.apache.org/repos/asf/usergrid/blob/1d89dbb6/stack/services/src/test/java/org/apache/usergrid/services/ServiceRequestIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/ServiceRequestIT.java
b/stack/services/src/test/java/org/apache/usergrid/services/ServiceRequestIT.java
index c678ba9..846c58e 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/ServiceRequestIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/ServiceRequestIT.java
@@ -226,7 +226,7 @@ public class ServiceRequestIT {
             throw e;
         }
 
-        //verifies it works now.
+        //verifies it works when doing a get/read repair
         assertNotNull( entityManager
                 .get( entityManager.getAlias( applicationInfo.getId(), collectionName, username
).getUuid() ) );
 


Mime
View raw message