[ 
https://issues.apache.org/jira/browse/USERGRID-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353122#comment-14353122
 ] 

ASF GitHub Bot commented on USERGRID-448:
-----------------------------------------

Github user snoopdave commented on the pull request:

    https://github.com/apache/incubator-usergrid/pull/173#issuecomment-77878271
  
    Review notes
    ===
    This is a big commit, so here are the key changes to consider.  Many files 
changed because I moved ApplicationInfo from the services module to the core 
module, my IDE did some uncalled for formatting (removing trailing spaces) and 
then I decided to move ApplicationInfo back home to services.
    
    CpEntityManagerFactory
    ---
    The main change here is that we no longer create an "appinfos" collection 
and instead rely solely on the "application_info" collection created by the 
ManagementServiceImpl.
       - System App and Default App have been removed completely, they were 
unused
       - No longer create redundant "organization" Entity
       - New impl. of deleteApplication() that saves connections
       - New impl. of restoreApplication() that restores connections
       - lookupAppication(name) uses alias instead of ES
       - migrationOldAppInfos() reads old "appinfo" entities and writes 
"application_info" entities. 
       - New property usergrid.twodoto.appinfo.migration which defaults to true
    
    JobServiceScheduler
    ---
    - Fixes to adapt to new way MetricsFactory is instantiated. Somebody 
changed it to be instantiated with Guice but did not fix this class.
    
    ManagementServiceImpl
    ---
    - New impl. of deleteApplication() that does some error checks and then 
calls emf.deleteApplication()
    - New impl. of restoreApplication() calls emf.restoreApplication(), 
restores token and organization connection, and adds activity
    
    ApplicationDeleteTest
    ---
    - New and comprehensive app delete and restore tests
    
    ApplicationsResource (test infrastructure)
    ---
    - Represents management ApplicationsResource end-point
    
    ManagementResponse (test infrastructure)
    ---
    - Represents JSON response from management end-points



> Remove redundant appinfos collections in ManagementServiceImpl
> --------------------------------------------------------------
>
>                 Key: USERGRID-448
>                 URL: https://issues.apache.org/jira/browse/USERGRID-448
>             Project: Usergrid
>          Issue Type: Bug
>          Components: Stack
>            Reporter: David Johnson
>            Assignee: David Johnson
>             Fix For: 2.0
>
>
> There is a flaw in the two-dot-o CpEntityManagerFactory.
> The factory stores a collection of "appinfo" type entities, but the 
> ManagementServiceImpl stores a redundant collection of "application_info" 
> entities. 
> The problem becomes evident when you try to delete an application. The 
> application will only be deleted from the "appinfos" collection. When you 
> call the management org/apps end-point you will still see the application 
> because the end-point uses the "application_infos". 
> To fix this:
> - Ensure that only one collection is stored
> - Add code to migrate the existing app information collections



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to