Unrecoverable state of pull request in case of Hibernate transaction rolled back

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 4.6.0
    • Affects Version/s: 3.11.6
    • Component/s: None
    • None

      While git fsck --full was executed as described in BSERV-8524 from other hand Stash still working.

      Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.atlassian.stash.internal.pull.InternalPullRequest#104916]
      

      This force to_hash field in database for table sta_pull_request rolled back to old commit. But in target branch commit was successful fetched. After what to one PR can't be merged in this branch, because old to_hash point to outdated commit, and HEAD of branch is above any to_hash.

      So, after such crash we need perform manually update sta_pul_requests set to_hash for any pr_state == 0 PR to actual last commit in each branch to fix that.

            Assignee:
            Justin Thomas
            Reporter:
            Alexey Efimov
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: