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

Pushing a large number of refs and canceling before completion does not trigger RefChangedEvents.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 8.9.4, 8.10.4, 8.11.3, 8.12.1, 8.13.0
    • 7.6.0, 8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0, 8.6.0, 8.7.0, 8.8.0, 8.9.0, 8.10.0, 8.11.0, 8.12.0
    • Git Hosting, Mesh
    • None

    Description

      Issue Summary

      This is reproducible on Data Center: yes

      When the push of a large number of refs is interrupted, the refs that got updated until the push was interrupted remain in the repository, however, none of the RefChangedEvents are published and therefore none of the background processing for ref changes are triggered, such as pull request rescoping, content hash recalculation, mirror syncing, updating the push log, etc.

      Steps to Reproduce

      1. Generate a large number of new branches in a repository
        for i in {1..10000}; do git checkout -b "branch_$i"; git commit --allow-empty -m"test $i"; git checkout -; done 
      1. Push all the refs to the remote
        git push origin --all 
      1. When the output hangs after these log messages, wait for a few seconds
        Writing objects: 100% (10809/10809), 5.70 MiB | 2.83 MiB/s, done.
        Total 10809 (delta 0), reused 6042 (delta 0), pack-reused 0 
      1. Check the UI on the commits page, click the branch selector dropdown. Some new branches should already be visible, however, the push log should not have been updated yet.
      2. Cancel the push by pressing CTRL+C in your terminal.

      Expected Results

      The push log should be updated together with the new branches showing up in the commit page branch selector.

      Actual Results

      The branches only show up in the commits page branch selector dropdown and not in the push log. Pull request rescoping and mirror sync is not kicked off.

      Workaround

      Doing an atomic push should avoid this issue:

      git push --all --atomic 

      Attachments

        Issue Links

          Activity

            People

              wkritzinger Wolfgang Kritzinger
              wkritzinger Wolfgang Kritzinger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: