Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly rollback in ForkRepository #17034

Merged
merged 2 commits into from
Sep 14, 2021

Commits on Sep 13, 2021

  1. Correctly rollback in ForkRepository

    The rollback functionality in
    services/repository/repository.go:ForkRepository is incorrect and could
    lead to a deadlock as it uses DeleteRepository to delete the rolled-back
    repository - a function which creates its own transaction.
    
    This PR adjusts the rollback function to only use RemoveAll as any
    database changes will be automatically rolled-back. It also handles
    panics and adjusts the Close within WithTx to ensure that if there is a
    panic the session will always be closed.
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Sep 13, 2021
    Configuration menu
    Copy the full SHA
    6da7f16 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2021

  1. Configuration menu
    Copy the full SHA
    8ac2679 View commit details
    Browse the repository at this point in the history