Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-21377

DVCS Quick enabling and disabling repository on UI lead to race condition and may lead to faulty state of repository

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • 8.13.0, 8.20.0, 8.22.0
    • DVCS Connector
    • None

    Description

      Issue Summary

      This is reproducible on Data Center: yes

      Quick enabling and disabling repository cause that two threads will parallel update statuses of messages connected to this repository. One will be changing state from PENDING → SLEEPING and second one from SLEEPING → PENDING. Updating of statuses is done in loop (not in batch) which leads to race condition. 

      Steps to Reproduce

      1. Open DVCS admin panel
      2. Find repository which has a lot of messages on queue
      3. Disable this repository and next enable it again

      Expected Results

      User shouldn’t be able to enable repository when disabling is not finished. Statuses of messages should be updated in one transaction using batch.

      Actual Results

      1. Two threads race condition → number of messages in status PENDING and in status SLEEPING is waving
      2. Threads can abort after some time and leave repository and its messages in faulty state. See https://jira.atlassian.com/browse/JSWSERVER-21378

       

      Workaround:

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              cbf119536079 Lyuboslav Varbanov (Inactive)
              5364cbaf95e3 Artur Luszcz (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: