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

    https://github.com/apache/incubator-usergrid/pull/165#discussion_r25743611
  
    --- Diff: 
stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
 ---
    @@ -317,12 +317,11 @@ public void deleteApplication(UUID applicationId) 
throws Exception {
             Query q = Query.fromQL(String.format("select * where 
applicationUuid = '%s'", applicationId.toString()));
             Results results = em.searchCollection( em.getApplicationRef(), 
"appinfos", q);
             Entity appToDelete = results.getEntity();
    -        em.delete( appToDelete );
    -
    -        // create new Entity in deleted_appinfos collection, with same 
UUID and properties as deleted appinfo
    -        em.create( "deleted_appinfo", appToDelete.getProperties() );
    -
    -        em.refreshIndex();
    +        if(appToDelete != null) {
    +            em.delete(appToDelete);
    --- End diff --
    
    We should reverse this.  If the node dies after this call, we won't have 
marked it.  Better to have an erroneous mark than to miss it completely.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to