Ticket #898 (closed Defect: fixed)

Opened 9 years ago

Last modified 8 years ago

Delete workspace fails

Reported by: jri Owned by: jri
Priority: Blocker Milestone: Release 4.8
Component: DeepaMehta Standard Distribution Version: 4.7
Keywords: Cc: dgf, Malte, JuergeN
Complexity: 5 Area:
Module: deepamehta-workspaces

Description

Since DM 4.5 (introduction of Workspace Sharing Modes) workspaces can't be deleted anymore.
Severe errors occur.
As a result the DB might be corrupted.

Since DM 4.5 each topic/assoc is supposed to be assigned to a workspace.
As a consequence when deleting a workspace all topics/assocs assigned to it must be deleted as well.

Change History

comment:1 Changed 9 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Jörg Richter <jri@…>

In 443fa6395c424679c99d650b4c67b8a787ae4423/deepamehta:

Index workspace assignments (#898).

3 new methods in Workspaces API:

List<Topic> getAssignedTopics(long workspaceId)

GET /workspace/{id}/topics

Returns all topics assigned to the given workspace.

List<Association> getAssignedAssociations(long workspaceId)

GET /workspace/{id}/assocs

Returns all topics assigned to the given workspace.

ResultList<RelatedAssociation> getAssignedAssociations(long workspaceId, String assocTypeUri)

GET /workspace/{id}/assocs/{assoc_type_uri}

Returns all associations of the given type that are assigned to the given workspace.

Note: the workspace assignments (= workspace property) is now indexed.
A migration that indexes alle the existing assignments is provided.

1 new method in Core's AccessControl:

long getAssignedWorkspaceId(long objectId)

Returns the ID of the workspace a topic or association is assigned to.

BREAKING CHANGE

1 method removed from Workspaces API:

boolean isAssignedToWorkspace(long objectId, long workspaceId)

Use getAssignedWorkspace(objectId).getId() or AccessControl?'s new getAssignedWorkspaceId(objectId) instead and do the comparison yourselves.

See #898.

comment:3 Changed 9 years ago by Jörg Richter <jri@…>

In 16f969a86e1ba182457b0b4ed389e388d2bd5dce/deepamehta:

Fix: deleting workspace doesn't corrupt DB (#898).

However deleting a workspace is still not functional.

But the transaction is rolled back and the DB is left intact.

See #898.

comment:4 Changed 8 years ago by Jörg Richter <jri@…>

In e5a174afb385d66d1289aa456bf835d96fd6108f/deepamehta:

Delete content before deleting a workspace (#898).

Before deleting a workspace all its content is deleted, that is all assigned topics/assocs, then all assigned types.

See #898.

comment:5 Changed 8 years ago by Jörg Richter <jri@…>

In 00078ee4e8c12358e02d6b19057adf34c929ca8e/deepamehta:

Topicmaps: refactor client-side code pt.1 (#898).

The plugin model is encapsulated in its own class (TopicmapsPluginModel).

See #898.

comment:6 Changed 8 years ago by Jörg Richter <jri@…>

In adfbcb2e95cd7421792e0703907989f56a377e2f/deepamehta:

Topicmaps: refactor client-side code pt.2 (#898).

The plugin view is encapsulated in its own class (TopicmapsPluginView).

See #898.

comment:7 Changed 8 years ago by Jörg Richter <jri@…>

In 4c6420c22d5015022c443a90729da98d3f9d7c36/deepamehta:

Fix delete topicmaps on workspace delete (#898).

See #898.

comment:8 Changed 8 years ago by Jörg Richter <jri@…>

In 686bf2958cfbba4444173f5e10a2319dbe2d8405/deepamehta:

Refactor client-side workspaces code (#898).

The plugin model and view are encapsulated in its own classes.

See #898.

comment:9 Changed 8 years ago by Jörg Richter <jri@…>

In 5d914ab6e9ceb9694ec189ea3698c1c734150007/deepamehta:

Cross-workspace instance deletion (#898).

When deleting a workspace also topic/assoc instances of that workspace's types are deleted even if the instances are assigned to another workspace. This is because deletion must perform transitively:

  • Deleting a workspace implies deleting the assigned types
  • Deleting a type implies deleting all instances (regardless of workspace assignment)

See #898.

comment:10 Changed 8 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.