Add global lock for migrations to make upgrade more safe with multiple replications (#33706)

This commit is contained in:
Lunny Xiao authored and GitHub committed 2025-03-07 21:08:53 +00:00
1 parent b8c2afdc5f
commit 1b2dffff8e
10 files changed
+46 -18

No files matched your search

+1 -1
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