Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19325

Pull Request Rescoping causing DeadLocks on MSSQL Server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Highest
    • None
    • 7.0.0, 8.0.0
    • Environment - Other

    Description

      Issue summary

      Pull requests rescoping on large monorepo with hundreds of pull requests open is causing a series of deadlocks in sta_pr_rescope_request  table in MSSQL Server 

      Enabling features such as ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT seem to not help.

      The behaviour is aggravated when the following property is set:

       pullrequest.rescope.threads=XX

       

      Environment

      • Bitbucket 7.x and 8.x

      Steps to Reproduce

      Monorepository with thousands of forks and hundreds of PRs open.

      Expected Results

      Actual Results

       INFO  [pull-request-rescoping:thread-1]  c.a.s.i.c.HazelcastBucketedExecutor Attempt 1 of 2 at processing bucket 'pull-request-rescoping@' for executor 'pull-request-rescoping' failed: 'could not execute batch; SQL [delete from sta_pr_rescope_request where id=?]; nested exception is org.hibernate.exception.LockAcquisitionException: could not execute batch'  

      Workaround

      N/A

      Attachments

        Activity

          People

            Unassigned Unassigned
            0d90b409cb18 Luiz Elias
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: