Upgrade from 1.11.6 to 1.12.1 fails (MySQL 8 Innodb cluster) #5637

Closed
opened 2025-11-02 06:31:34 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @mihkelvain on GitHub (Jun 26, 2020).

  • Gitea version (or commit ref): 1.12.1
  • Git version: 1.8.3.1
  • Operating system: Centos 7
  • Database (use [x]):
    • PostgreSQL
    • [x ] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • [x ] Not relevant
  • Log gist:

Description

When trying to start up binary version 1.12.1, it fails with following messages in gitea.log


2020/06/26 11:21:34 ...ations/migrations.go:300:Migrate() [I] Migration[126]: Fix topic reposito
ry count
2020/06/26 11:21:34 ...m.io/xorm/core/db.go:277:ExecContext() [I] [SQL] DELETE FROM `repo_topic`
 WHERE `repo_id` NOT IN (SELECT `id` FROM `repository`) [] - 496.336µs
2020/06/26 11:21:34 routers/init.go:77:initDBEngine() [E] ORM engine initialization attempt #9/1
0 failed. Error: migrate: do migrate: Error 3098: The table does not comply with the requirement
s by an external plugin.
2020/06/26 11:21:34 routers/init.go:78:initDBEngine() [I] Backing off for 3 seconds
2020/06/26 11:21:37 routers/init.go:71:initDBEngine() [I] ORM engine initialization attempt #10/
10...

Since I run gitea on mysql 8 innodb cluster, then best bet is that gitea schema is not compliant with Innodb cluster requirements. Mainly primary key requirement.
I actually reported missing PK a while ago: https://github.com/go-gitea/gitea/issues/8920

I opened this issue, because I'm not 100% sure DB migration fails due to missing PK.

Originally created by @mihkelvain on GitHub (Jun 26, 2020). - Gitea version (or commit ref): 1.12.1 - Git version: 1.8.3.1 - Operating system: Centos 7 - Database (use `[x]`): - [ ] PostgreSQL - [x ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x ] Not relevant - Log gist: ## Description When trying to start up binary version 1.12.1, it fails with following messages in gitea.log ``` 2020/06/26 11:21:34 ...ations/migrations.go:300:Migrate() [I] Migration[126]: Fix topic reposito ry count 2020/06/26 11:21:34 ...m.io/xorm/core/db.go:277:ExecContext() [I] [SQL] DELETE FROM `repo_topic` WHERE `repo_id` NOT IN (SELECT `id` FROM `repository`) [] - 496.336µs 2020/06/26 11:21:34 routers/init.go:77:initDBEngine() [E] ORM engine initialization attempt #9/1 0 failed. Error: migrate: do migrate: Error 3098: The table does not comply with the requirement s by an external plugin. 2020/06/26 11:21:34 routers/init.go:78:initDBEngine() [I] Backing off for 3 seconds 2020/06/26 11:21:37 routers/init.go:71:initDBEngine() [I] ORM engine initialization attempt #10/ 10... ``` Since I run gitea on mysql 8 innodb cluster, then best bet is that gitea schema is not compliant with Innodb cluster requirements. Mainly primary key requirement. I actually reported missing PK a while ago: https://github.com/go-gitea/gitea/issues/8920 I opened this issue, because I'm not 100% sure DB migration fails due to missing PK.
Author
Owner

@mihkelvain commented on GitHub (Jun 30, 2020):

JFYI. I migrated gitea schema away from mysql 8 innodb cluster to single instance 5.6 mysql (because I had this one laying around) and upgrade to 1.12.1 was completed without issues.

@mihkelvain commented on GitHub (Jun 30, 2020): JFYI. I migrated gitea schema away from mysql 8 innodb cluster to single instance 5.6 mysql (because I had this one laying around) and upgrade to 1.12.1 was completed without issues.
Author
Owner

@stale[bot] commented on GitHub (Aug 29, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 29, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Sep 12, 2020):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Sep 12, 2020): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Author
Owner

@zeripath commented on GitHub (Sep 13, 2020):

Closed by #12639

@zeripath commented on GitHub (Sep 13, 2020): Closed by #12639
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5637