usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [09/16] usergrid git commit: fix deindex on update -- was deindexing current version along with old versions
Date Tue, 23 Oct 2018 03:17:47 GMT
fix deindex on update -- was deindexing current version along with old versions


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

Branch: refs/heads/master
Commit: c98a5e92d1f2bf2424624e6c1f76511a345f5d69
Parents: 1feb3db
Author: Mike Dunker <mdunker@google.com>
Authored: Thu Mar 8 15:05:09 2018 -0800
Committer: Keyur Karnik <keyur.karnik+github@gmail.com>
Committed: Tue Aug 28 16:41:44 2018 -0700

----------------------------------------------------------------------
 .../corepersistence/asyncevents/EventBuilderImpl.java        | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/c98a5e92/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
index 1eb5e03..dbec084 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
@@ -301,14 +301,14 @@ public class EventBuilderImpl implements EventBuilder {
 
 
         return indexService.deIndexOldVersions( applicationScope, entityId,
-            getVersionsOlderThanOrEqualToMarked(ecm, entityId, markedVersion));
+            getVersionsOlderThanMarked(ecm, entityId, markedVersion));
 
 
     }
 
 
-    private List<UUID> getVersionsOlderThanOrEqualToMarked(final EntityCollectionManager
ecm,
-                                                           final Id entityId, final UUID
markedVersion ){
+    private List<UUID> getVersionsOlderThanMarked(final EntityCollectionManager ecm,
final Id entityId,
+                                                  final UUID markedVersion ){
 
         final List<UUID> versions = new ArrayList<>();
 
@@ -317,7 +317,7 @@ public class EventBuilderImpl implements EventBuilder {
         ecm.getVersionsFromMaxToMin( entityId, markedVersion)
             .take(100)
             .forEach( mvccLogEntry -> {
-                if ( mvccLogEntry.getVersion().timestamp() <= markedVersion.timestamp()
) {
+                if ( mvccLogEntry.getVersion().timestamp() < markedVersion.timestamp()
) {
                     versions.add(mvccLogEntry.getVersion());
                 }
 


Mime
View raw message