What is the relation between Fixversions and Components in JIRA. "tables which are involved in "issue.getComponents" and ''changing FIX version on transition

Srinivasa Rajendra Pudi November 14, 2016

Hello Team,

Please find the issues we are facing below:

1)I have upgraded JIRA from 6.3.15 to 7.0.4, After that I'm facing issue with Transition. - (If I change "FixVersion OR "affects version" on transition screen entire jira is getting hung)

The above behavior is happening only if "component Watchers" plugin is enabled and "Component/s" field is not available on the transition screen.

2)We have extensively used "Components Watchers plugin" so cannot go without that plugin.

3) As part of analyzing I have deleted all the existing projects in JIRA(test which is upgraded to 7.0.11) and created a "Test project" and only one issue till the issue is persisting.

4)If you need I can provide the DB dump as well.

5) Same problem is there if install new jira and point to this DB.

6)Tried re-indexing, Integrity checker many times.

7)Analyzed the plugin code - JIRA is getting hung only when it tries to use 
"issue.getComponents()" Api 
only if "component Watchers" plugin is enabled and "Component/s" field is not available on the transition screen.

2 answers

2 votes
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 15, 2016

They have very little in common technically, but there is one particular place where they run into each other, and that is in the way that they are stored in the database:

jira_jdog=# SELECT DISTINCT source_node_entity, sink_node_entity, association_type FROM nodeassociation ORDER BY association_type;
 source_node_entity |   sink_node_entity    | association_type
--------------------+-----------------------+------------------
 Issue              | Component             | IssueComponent
 Issue              | Version               | IssueFixVersion
 Issue              | Version               | IssueVersion
 Project            | ProjectCategory       | ProjectCategory
 Project            | FieldLayoutScheme     | ProjectScheme
 Project            | PermissionScheme      | ProjectScheme
 Project            | WorkflowScheme        | ProjectScheme
 Project            | NotificationScheme    | ProjectScheme
 Project            | IssueTypeScreenScheme | ProjectScheme
 Project            | IssueSecurityScheme   | ProjectScheme
(10 rows)

 

Disclaimer: Don't blame me for this; I didn't do it.

Not everybody is an expert in database design.  One of the early schema design decisions that still haunts JIRA is the existence of this "nodeassociation" table that connects essentially any entity to essentially any other.  As you can see from this sampling from one of our internal systems, this is used to associate projects with their schemes (mostly... field configuration schemes are handled differently), and also what associates an issue with its affects versions, fix versions, and components.

My guess would be that this plugin is causing a deadlock by doing work inside of a transaction that is not working and playing well with the transaction for the issue edit that changes the components, probably due to interactions in the nodeassociation table.  The deadlock may be entirely in the database, or it may be an interaction between a database lock and a JVM lock within JIRA or the plugin.  These problems can be pretty difficult to diagnose, and which database you are using would be important information for knowing how to look for the transaction involved.

I would:

  1. Reproduce the problem
  2. Get a snapshot of what database transactions are open and what statement, if any, they are currently executing.
  3. Use jstack to dump the JIRA threads
  4. Try to reconcile the mutual lock information to identify what the lock actually is.  I would focus on database queries that use the nodeassociation table and JVM threads that use calls like "getRelated".  Be warned that this is not easy, and it's probably more appropriate to submit this in a bug report with the plugin developer.

 

 

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 15, 2016

>Disclaimer: Don't blame me for this; I didn't do it.

I know smile

1 vote
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2016

Hi Srinivasa,

> The above behavior is happening only if "component Watchers" plugin is enabled and "Component/s" field is not available on the transition screen.

It makes me think that the problem is caused by the "Component Watchers" addon. I advise you to ask support from the addon creator: https://marketplace.atlassian.com/plugins/com.burningcode.jira.plugin.jiracomponentwatcher/server/support

Also you may want to check the db integrity: https://confluence.atlassian.com/adminjiraserver071/using-the-database-integrity-checker-802592958.html

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 14, 2016

To answer the question in the title too, "none".  Components and versions are unrelated in any technical way.  They have things in common - they go onto issues, they're configured by project admins at a project level, but no real relationship.

As Volodymyr says, it must be the add-on - it sounds like it is intercepting changes on screen and handling them incorrectly.

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 15, 2016

@Nic Brough [Adaptavist]: That... isn't 100% true... there is 1 very important technical thing that they share at the database layer.  I'll explain in a separate answer.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 15, 2016

Ah, you mean the associative link table?  I was thinking more of the business logic, not quite how they're stored.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events