Uploaded image for project: 'JIRA Server (including JIRA Core)'
  1. JIRA Server (including JIRA Core)
  2. JRASERVER-33293

Usage of native OSWorkflow Auto Transiton has many risk of inconsistency due to the new Index Management

    Details

      Description

      With the new indexation management, appeared since JIRA 5.1, the OSWokflow Auto Transition (auto=true in action tag of XML Descriptor) has risk to produce inconsistency in the indexation.

      As soon as a Transition is started, the OSWorkflowManager disables the indexation for the current thread, and cause that the IndexManager pushes all issue indexation in a queue.

      At the end of transaction, the OSWorkflowManager releases the indexation, and the IndexManager iterates on this queue (for the current Thread).

      The Bug is that this queue is implemented with a HashSet<Issue>, and if we implement an Auto Transition, the same issue is added 2 times in the queue, but with 2 different MutableIssue. And since the HashSet is based on a HashMap, the different version of the Issue are systematically indexed in the update order. Result : The indexation can be inconsistent against values stored in database.

      The Queue should be based on a LinkedHashSet or better, the last version of the issue should be the only indexed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                v_thoule Vincent Thoulé
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: