Github user shawnfeldman commented on a diff in the pull request:

    https://github.com/apache/incubator-usergrid/pull/256#discussion_r31176980
  
    --- Diff: 
stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
 ---
    @@ -125,12 +128,30 @@ public EntityDeleteResults queueEntityDelete( final 
ApplicationScope application
     
             final GraphManager gm = graphManagerFactory.createEdgeManager( 
applicationScope );
     
    +        //needs get versions here.
    +
    +
    +        //TODO: change this to be an observable
    +        //so we get these versions and loop through them until we find the 
MvccLogEntry that is marked as delete.
    +        //TODO: evauluate this to possibly be an observable to pass to the 
nextmethod.
    +        MvccLogEntry mostRecentlyMarked = ecm.getVersions( entityId 
).toBlocking()
    +                                             .firstOrDefault( null,
    +                                                 mvccLogEntry -> 
mvccLogEntry.getState() == MvccLogEntry.State.DELETED );
    +
    +        //If there is nothing marked then we shouldn't return any results.
    +        //TODO: evaluate if we want to return null or return empty 
observable when we don't have any results marked as deleted.
    +        if(mostRecentlyMarked == null)
    +            return null;
     
             //observable of index operation messages
    +        //this method will need the most recent version.
    +        //When we go to compact the graph make sure you turn on the 
debugging mode for the deleted nodes so
    +        //we can verify that we mark them. That said that part seems kinda 
done. as we also delete the mvcc buffers.
             final Observable<IndexOperationMessage> edgeObservable =
    --- End diff --
    
    probably needs to be flatmap


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to