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

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

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
Chris Fuller Atlassian Team Nov 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.

 

 

 

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

I know smile

1 votes
Volodymyr Krupach Community Champion Nov 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

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.

Chris Fuller Atlassian Team Nov 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.

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 Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

394 views 1 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot