Home Forums Development Deleting workspace links issue

Viewing 1 reply thread
  • Author
    • #15663

      Hi Team, we recently met an issue when working with workspace links. This is how it happened:

      There was a specific requirement for certain workspace to show by default for each user. To fulfil this request, we have created WorkspaceLinks between each user and the specific workspace. The number of WorkspaceLinks will be the same as the number of users.

      We have more than 17000 users in QA and for each Workspace which is supposed to be shown by default to the users there will be the same number of WorkspaceLinks created.

      This is not an issue until there is a need to delete a Workspace. The underlying framework will try to delete all the WorkspaceLinks associated with the Workspace but there is a limitation by the framework – only around 8900 records can be deleted each time. Since our number of records associated with the Worksapce is way more than the limit, an error is thrown and if we are deploying a build, the deployment will fail.

      To work around this issue, we deleted the links which are associated with inactive users and this bring the total active number of user and thus remaining WorkspaceLinks to around 2000 for QA. But we around 6000 active users in Production, this is still a potential issue in the future.

      Since the deletion is through framework by database cascading, we don’t have control to a page by page handling, we will not be able to prevent this from happening when the active number of users come close to the limit.

      In this case, what are we supposed to do: a way to increase the limitation (with a potential performance risk?) or there might be a better way to handle this?

      Any feedback will be appreciated,


    • #15680
      Atulan ZamanAtulan Zaman

      Hi Wyu,

      In this case, instead of relying on cascade delete from framework, I would recommend adding an augment to the “workspace class” in your project, and injecting a before-action to the delete event, which would use (for-each-page) to look-up the relevant workspace-links and delete them and delete them in chunks.

      I am curious though, is deleting a workspace something you expect to happen commonly? It shouldn’t. This should only be system-level action that should only be happening during initial project deployment or major upgrades. Even then, I’m not sure if it would necessitate deleting the workspace from record. I’m assuming by workspace you are referring to workspaces in MDA UI, which is might or might not be a correct assumption.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.