Clean the [Designer].[CollabData] table to prevent intermittent deadlocks in K2 Designer

  • 15 February 2022
  • 0 replies
  • 12 views

Userlevel 5
Badge +20
 

Clean the [Designer].[CollabData] table to prevent intermittent deadlocks in K2 Designer

KB002944

PRODUCT
K2 Five

 

Introduction

When you design a workflow in K2 Designer and close the workflow using the “x” window button instead of using the File > Close option, the entry for the workflow is not removed from the [Designer].[CollabData] table in the database. This table contains entries for workflows that are being edited. The data remains in the table in case of a browser crash or unplanned disconnect so you can safely continue to edit your workflow without losing any data. However, when you have many workflows not closed using the File > Close option, the number of entries in the table increases and causes deadlock errors in K2 Designer. To prevent this, you need to gracefully close all the workflows by using the File > Close option in the designer. If you do experience the deadlock errors, follow the steps below to clean the [Designer].[CollabData] table. Another option is to upgrade to K2 Five (5.1) or higher as an enhancement was made to reduce the number of rows in this table.

 

 

Steps

You have 2 options to clean the [Designer].[CollabData] table.

 

Option 1

  1. Run the script below to get a list of workflow names that have data in the [Designer].[CollabData] table. 

     

    SELECT [P].[Name}

    FROM [Designer].[Process] AS [P]

    JOIN [Designer].[CollabData] AS [CD]

    ON [P].[JsonId] = [CD].[Id]

  2. Open all the workflows and close each one by using the File > Close option in the K2 Designer.

Option 2

  1. Close the workflows with the most rows in the database. Run the following script to get the names of the workflows with the most rows in the [Designer].[CollabData] table 

     

    SELECT 

    [P].[Name],

    COUNT(1) AS [Count]  

    FROM [Designer].[Process] AS [P]

    JOIN [Designer].[CollabData] AS [CD]

    ON [P].[JsonId] = [CD].[SessionId]

    GROUP BY [SessionId], [P].[Name]

    ORDER BY [Count] DESC

  2. Open each one of these workflows and use the File > Close option.

Considerations

It is recommended to regularly make a backup of your K2 database.

 


0 replies

Be the first to reply!

Reply