Add global lock for migrations to make upgrade more safe with multiple replications (#33706)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run

This commit is contained in:
Lunny Xiao
2025-03-07 13:08:53 -08:00
committed by GitHub
parent b8c2afdc5f
commit 1b2dffff8e
10 changed files with 46 additions and 18 deletions

View File

@@ -413,7 +413,7 @@ func ExpectedDBVersion() int64 {
}
// EnsureUpToDate will check if the db is at the correct version
func EnsureUpToDate(x *xorm.Engine) error {
func EnsureUpToDate(ctx context.Context, x *xorm.Engine) error {
currentDB, err := GetCurrentDBVersion(x)
if err != nil {
return err