Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I delete safely entries in jiraworkflows table?

Sylvie Ruffin June 7, 2020

Started with messages in the jira-atlassian log that there was duplicates in the table for one workflow. I can see in the audit log that indeed it was created 3 times in the same second.

Now I can't see the list of my workflows in the admin/workflows page and I can't access any workflow scheme ( get message "The Jira server was contacted but has returned an error response. We are unsure of the result of this operation." and in the log:

2020-05-29 18:42:24,359 https-jsse-nio-443-exec-49 ERROR bayonap 1122x2164668x3 1oe49qb 172.18.155.214 /rest/projectconfig/latest/workflowscheme/HHWS6 [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: java.lang.IllegalStateException: There are more than one workflows associated with 'X Ray Test Workflow' in the database!

com.atlassian.cache.CacheException: java.lang.IllegalStateException: There are more than one workflows associated with 'X Ray Test Workflow' in the database!

at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:211)

at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:162)

at com.atlassian.jira.workflow.CachingWorkflowDescriptorStore.getWorkflow(CachingWorkflowDescriptorStore.java:64)

at com.atlassian.jira.workflow.JiraWorkflowFactory.getWorkflow(JiraWorkflowFactory.java:33)

 

I tried full reindex, Integrity checker (said all is fine with the database) without any change.

I opened a ticket with Atlassian support GHS-189956 they mentioned  JRASERVER-40009 which is similar problem on jiradraftworkflows.

However I was expecting a bit more support from them.

I need to clear the database from that workflow but I don't suppose deleting the 2 extra rows for the workflow in jiraworkflows should be enough, I expect I should also clean the tables that describe the workflow. Would someone be able to point me towards the proper tables? I have a copy of the production database in development environment and would like to find quickly the proper correction. 

1 answer

0 votes
Rachel Yager June 4, 2022

Not sure how safe this truly is (hopefully Atlassian weighed in on your ticket), but when faced with a similar error, we found that renaming the duplicate workflow in the jiraworkflows table was sufficient to clear the error so we could safely delete the inactive workflow(s) via the UI (which then, I'm assuming, safely deleted it recursively as needed within the database itself).

Using the query from JRASERVER-40009, you can target the active workflows table instead (jiraworkflows) to identify duplicate workflows by name (alternatively, just run a select statement using the workflow name you have above) and rename one of them using UPDATE and the appropriate workflow ID - see below example statement but double check against your column names.

update jiraworkflows set workflowname = 'Your String here' where id = XXXX

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events