You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by shawnfeldman <gi...@git.apache.org> on 2015/04/08 18:00:36 UTC

[GitHub] incubator-usergrid pull request: Usergrid 550 - change migration t...

GitHub user shawnfeldman opened a pull request:

    https://github.com/apache/incubator-usergrid/pull/216

    Usergrid 550 - change migration to use new structure for app info

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-usergrid USERGRID-550

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-usergrid/pull/216.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #216
    
----
commit 4ba951008c793ca56decd7240c2e2e9c4ab954be
Author: Shawn Feldman <sf...@apache.org>
Date:   2015-04-08T15:30:48Z

    fixed migration logic

commit 5a883cf7a3c63b5524810f3ad115391d95423e8d
Author: Shawn Feldman <sf...@apache.org>
Date:   2015-04-08T15:39:47Z

    fixed migration logic

commit 794412b27fbdb8aba736c846a92647e70af6e484
Author: Shawn Feldman <sf...@apache.org>
Date:   2015-04-08T15:59:22Z

    fixed migration logic

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-usergrid pull request: Usergrid 550 - change migration t...

Posted by tnine <gi...@git.apache.org>.
Github user tnine commented on a diff in the pull request:

    https://github.com/apache/incubator-usergrid/pull/216#discussion_r28011388
  
    --- Diff: stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java ---
    @@ -347,67 +363,23 @@ public void deleteApplication(UUID applicationId) throws Exception {
                     }
                 });
             }
    -        final ApplicationEntityIndex aei = entityIndexFactory.createApplicationEntityIndex(deletedAppScope);
    -        final Observable deleteNodeGraph = managementGraphManager.deleteNode(deletedAppId, Long.MAX_VALUE);
    +        final ApplicationEntityIndex aei = entityIndexFactory.createApplicationEntityIndex(applicationScope);
    +        final GraphManager managementGraphManager = managerCache.getGraphManager(managementAppScope);
    +        final Observable deleteNodeGraph = managementGraphManager.deleteNode(applicationId, Long.MAX_VALUE);
    --- End diff --
    
    Deleting the old app entity makes me nervous. In the event we encounter a bug, we wont' have any roll back strategy.  Can we just migrate to the new info, then possibly delete the old values in our next release after it's been deployed and we ensure it's solid?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-usergrid pull request: Usergrid 550 - change migration t...

Posted by tnine <gi...@git.apache.org>.
Github user tnine commented on a diff in the pull request:

    https://github.com/apache/incubator-usergrid/pull/216#discussion_r28009238
  
    --- Diff: stack/core/src/main/java/org/apache/usergrid/corepersistence/ApplicationIdCacheFactory.java ---
    @@ -0,0 +1,43 @@
    +/*
    + *
    --- End diff --
    
    Ahh, I see.  I missed that, it depends on the management app entity manager.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-usergrid pull request: Usergrid 550 - change migration t...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-usergrid/pull/216


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-usergrid pull request: Usergrid 550 - change migration t...

Posted by shawnfeldman <gi...@git.apache.org>.
Github user shawnfeldman commented on a diff in the pull request:

    https://github.com/apache/incubator-usergrid/pull/216#discussion_r28011564
  
    --- Diff: stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java ---
    @@ -347,67 +363,23 @@ public void deleteApplication(UUID applicationId) throws Exception {
                     }
                 });
             }
    -        final ApplicationEntityIndex aei = entityIndexFactory.createApplicationEntityIndex(deletedAppScope);
    -        final Observable deleteNodeGraph = managementGraphManager.deleteNode(deletedAppId, Long.MAX_VALUE);
    +        final ApplicationEntityIndex aei = entityIndexFactory.createApplicationEntityIndex(applicationScope);
    +        final GraphManager managementGraphManager = managerCache.getGraphManager(managementAppScope);
    +        final Observable deleteNodeGraph = managementGraphManager.deleteNode(applicationId, Long.MAX_VALUE);
    --- End diff --
    
    yes



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---