usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdun...@apache.org
Subject usergrid git commit: changes to orphaned edge code from code review
Date Fri, 13 Oct 2017 18:23:28 GMT
Repository: usergrid
Updated Branches:
  refs/heads/fixOrphanedEdges f4842b06c -> 1a02bb368


changes to orphaned edge code from code review


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

Branch: refs/heads/fixOrphanedEdges
Commit: 1a02bb368c76d1c6075372d4c58eab2dbc6c0764
Parents: f4842b0
Author: Mike Dunker <mdunker@google.com>
Authored: Fri Oct 13 11:13:14 2017 -0700
Committer: Mike Dunker <mdunker@google.com>
Committed: Fri Oct 13 11:13:14 2017 -0700

----------------------------------------------------------------------
 .../read/traverse/EntityLoadVerifyFilter.java       | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/1a02bb36/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java
index 7cc9735..cc82bd8 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java
@@ -178,21 +178,19 @@ public class EntityLoadVerifyFilter extends AbstractFilter<FilterResult<Id>,
Fil
                     if (timestampDiff > allowedDiff) {
                         // edges must be orphans, delete edges
                         for (MarkedEdge edge: edgeList) {
-                            MarkedEdge markedEdge = graphManager.markEdge(edge).toBlocking().lastOrDefault(null);
-                            if (markedEdge != null) {
-                                graphManager.deleteEdge(markedEdge).toBlocking().lastOrDefault(null);
-                                edgesDeleted += 1;
-                            }
+                            graphManager.markEdge(edge).toBlocking().lastOrDefault(null);
+                            edgesDeleted++;
                         }
+                        graphManager.deleteEdge(firstEdge).toBlocking().lastOrDefault(null);
                     }
                 }
 
                 if (edgesDeleted > 0) {
-                    logger.warn("Read graph edge and received candidate with entityId {},
yet was not found in cassandra."
-                        + "  Deleted {} edges.", candidateId, edgesDeleted);
+                    logger.warn("Read graph edge and received candidate with entityId {}
(application {}), yet was not found in cassandra."
+                        + "  Deleted at least {} edges.", candidateId, applicationScope.getApplication().getUuid().toString(),
edgesDeleted);
                 } else {
-                    logger.warn("Read graph edge and received candidate with entityId {},
yet was not found in cassandra."
-                        + "  Ignoring since this could be a region sync issue", candidateId);
+                    logger.warn("Read graph edge and received candidate with entityId {}
(application {}), yet was not found in cassandra."
+                        + "  Ignoring since this could be a region sync issue", candidateId,
applicationScope.getApplication().getUuid().toString());
                 }
 
 


Mime
View raw message