-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Error 500 on new issue (not for all repositories) #17070
Comments
I have a simillar issue #17067 |
Indeed, even though the error message is different, maybe due to database differences? |
Perhaps, I am not experienced on this argument. |
They are different problems. For the MySQL/MariaDB error -- backup your database first!!!
replace into issue_index (group_id, max_index) select repo_id, max(`index`) from issue group by repo_id; I think this bug may be caused by the repository migrated by an old gitea, or some legacy data, which doesn't set issue_index correctly. related issue: #16683 , fixed by: #16687 |
Thanks.. apparently, the migration code that you linked to is begin triggered just before the new issue with error 500 is created:
So apparently that code doesn't fix everything already? |
How did you migrate to 1.15.2? Did you go via 1.15.0? (Others reading this - ALWAYS GO STRAIGHT TO THE LATEST MINOR RELEASE.) It would be helpful to check the contents of the issue_index table. |
I jumped straight from 1.14.6 to 1.15.2. Tomorrow I'll look into the tables and I'll let you know |
Could you paste the logs before this line |
Sure,
after this query, the content of the
I haven't executed the workaround by @wxiaoguang yet, but the relevant part of their query returns the following result:
|
So it looks like your issue_index table is completely out of sync. I don't understand how this has happened. The contents of issue_index should be the same as those of the query. |
migrations v182 should update the table correctly. But it's not. It's wired. |
It seems that this issue has been fixed. So we close this one. |
Not fixed, but since then I have verified with |
I have provided a SQL to fix. |
For any future reader: the sql fix works. |
Gitea Version
1.15.2
Git Version
2.30.2
Operating System
Debian 11, kernel 5.10.0-8-amd64
How are you running Gitea?
Self hosted gitea, binary service through systemd
Database
MySQL
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
I recently upgraded from 1.14.6 to 1.15.2, one of my repositories is getting error 500 when opening a new issue. It works on other repositories.
I'm using MariaDB 15.1
The relevant log is
Screenshots
No response
The text was updated successfully, but these errors were encountered: