-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Migration: migrating migrated repo fail #13271
Comments
Dude!! Seriously this is a bad bad bad issue report! I presume you mean that you were trying to migrate the repository https://try.gitea.io/abcKing/GitNex from try.gitea.io to a local server and the local server deadlocked? Or do you mean that try deadlocked? I'm guessing you meant your local server's database is MySQL? Do you have any logs around this point? Are you sure it's a DB deadlock and not some kind of http loop or other code deadlock? MySQL should have a deadlock breaker meaning that at least one of the deadlocking queries/transactions should get broken. Have you repeated the procedure with: [database]
LOG_SQL=true
... to get the SQL logs for this? |
@zeripath try uses sqlite, so it's easy to let the DB deadlock. |
I'll shuld be more specific 😓 - but do not have logs at the moment, so I only can gess ... ... I'll work on this issue - and if I konw more I'll let you konw |
no worries - it's just that if a user had made this report we'd be all stuck scratching our heads! |
@zeripath I have an error loged 🎉 - thanks for the error screen on migrations :)
|
so I guess: since source repo is already a migrated repo: api returns some entrys who make no sence the question is how to treat them: drop/show as GhotUser/ ?!? |
When migrating repositories with reactions with deleted users, the original author id may be -1. This means that it is possible to end up attempting to create multiple reactions with the same [ Type, IssueID, CommentID, UserID, OriginalAuthorID ] thus breaking the constraints. On SQLite this appears to cause a deadlock but on other dbs this will cause the migration to fail. This PR extends the constraint to include the original author username in the constraint. Fix go-gitea#13271 Signed-off-by: Andrew Thornton <art27@cantab.net>
When migrating repositories with reactions with deleted users, the original author id may be -1. This means that it is possible to end up attempting to create multiple reactions with the same [ Type, IssueID, CommentID, UserID, OriginalAuthorID ] thus breaking the constraints. On SQLite this appears to cause a deadlock but on other dbs this will cause the migration to fail. This PR extends the constraint to include the original author username in the constraint. Fix #13271 Signed-off-by: Andrew Thornton <art27@cantab.net>
while try to migrate from gitea ( 1.14.0+dev-63-g26d6c1530) to gitea (1.14.0+dev-44-gf0fe5683f) a db deadlock ocure (mysql)
source repo: https://try.gitea.io/abcKing/GitNex
The text was updated successfully, but these errors were encountered: