Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-25914

Two issues created with the same pkey value...

    XMLWordPrintable

Details

    Description

      A temporary workaround to mitigate risk is detailed below. Please remember to backup your instance prior to making any changes to your system.

      There were somehow two issues with the issue key JSP-93880 created on SAC. The issue key could not be accessed through the web interface, the error was understandably about expecting one value and getting multiples:

      @400000004e92f2300f44b2f4 2011-10-10 08:24:54,255 http-172.16.3.44-8080-52 ERROR      [500ErrorPage.jsp] Exception caught in 5
      00 page Passed List had more than one value.
      @400000004e92f2300f44bac4 java.lang.IllegalArgumentException: Passed List had more than one value.
      @400000004e92f2300f44beac       at org.ofbiz.core.entity.EntityUtil.getOnly(EntityUtil.java:62)
      @400000004e92f2300f44beac       at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssue(De
      

      One of the two issues was a duplicate of JSP-93382. I removed the database entry for that issue, which restored access to the issue through the web interface.

      Searching for the deleted issue's description, as in "convert internal directory to LDAP" still returns two issues, JSP-93382 and JSP-93380. The entry in that search for JSP-93380 has the wrong summary, but clicking the link goes to the sole remaining issue. I suspect a full reindex will be required to make that bogus entry go away.

      To track this down further, I would propose adding a constraint to disallow duplicate pkey values, as in:

      alter table jiraissue add constraint pkey_unique unique (pkey);
      

      Once that's in place, a database error will thrown whenever an attempt is made to create a second record with the same pkey. Looking at previous examples of other problems, I'd expect something like org.postgresql.util.PSQLException in our case.

      The issues were not created from support requests, nor were they created from mail messages. I suspect that someone it's possible for two threads to end up with the same new pkey.

      This is happening about once a week at this point, so it's not an isolated incident. I don't see anything telling in the logs immediately before the original error, any ideas about tracking this down would be appreciated.

      Attachments

        Issue Links

          Activity

            People

              brollins Bryan Rollins
              aatkins TonyA
              Votes:
              23 Vote for this issue
              Watchers:
              65 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: