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) #17045

Merged
merged 2 commits into from
Sep 15, 2021

Commits on Sep 14, 2021

  1. Correctly rollback in ForkRepository (go-gitea#17034)

    Backport go-gitea#17034
    
    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 14, 2021
    Configuration menu
    Copy the full SHA
    ce0def5 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2021

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