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.