Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate strategies for removing cascading entities #1803

Closed
skabashnyuk opened this issue Jul 18, 2016 · 2 comments
Closed

Investigate strategies for removing cascading entities #1803

skabashnyuk opened this issue Jul 18, 2016 · 2 comments
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Milestone

Comments

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Jul 18, 2016

The problem:
User removed, but related entities like Workspaces, Factories or Permissions are not removed which leaves the system in inconsistent state and causes different problems(e.g. if workspace is not removed than namespace is still aquired by non-existing user, while it is impossible to use that namespace).

Requirements:

  1. Entity related data must be removed along with the entity
  2. If it is impossible to remove some of entity related data, then entity mustn't be removed either and removed data must be restored. In this way we can create application related constraints which will enforce user to perform some actions before removing the entity.
  3. Sometimes it is necessary to know that entity is removed, the mechanism of notifying clients based on the EntityRemoved events which usually published after entity is removed.
    So the strategy of cascade removing should be rather on application-level than on the DBMS level which allows to control EntityRemoved events.

What should be done:
As a result we should investigate the best way for performing cascade remove which fits our application architecture with all the pros and cons of it.

Consider using:

  • EventBus
  • Jpa Events
@skabashnyuk skabashnyuk added kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/next team/platform labels Jul 18, 2016
@skabashnyuk skabashnyuk mentioned this issue Jul 18, 2016
15 tasks
@skabashnyuk skabashnyuk added kind/enhancement A feature request - must adhere to the feature request template. sprint/current and removed kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/current sprint/next labels Jul 19, 2016
@voievodin voievodin added the status/in-progress This issue has been taken by an engineer and is under active development. label Jul 26, 2016
@voievodin voievodin removed the status/in-progress This issue has been taken by an engineer and is under active development. label Aug 3, 2016
@skabashnyuk skabashnyuk reopened this Aug 4, 2016
@TylerJewell
Copy link

@skabashnyuk - I think we can close this issue, correct? This was an investigation issue and we have already completed the implementation and merge.

@skabashnyuk
Copy link
Contributor Author

issues is not closed because code related to it is not merged in master. We will do that when epic #1790 will be closed

@bmicklea bmicklea added this to the 5.0.0-M2 milestone Sep 13, 2016
@skabashnyuk skabashnyuk added status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. sprint/current and removed status/pending-merge sprint/current status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. labels Sep 20, 2016
@riuvshin riuvshin added this to the 5.0.0-M3 milestone Sep 20, 2016
@riuvshin riuvshin removed this from the 5.0.0-M2 milestone Sep 20, 2016
@bmicklea bmicklea changed the title Investigate strategies for cascade entities removing Investigate strategies for removing cascading entities Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

5 participants