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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: High
    • 6.0-OD-09, 6.0
    • Affects Version/s: 5.1
    • Component/s: None
    • 5.01

      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.

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

              Created:
              Updated:
              Resolved: