go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.6k stars 5.45k forks source link

Duplicate post request #6189

Closed yasuokav closed 4 years ago

yasuokav commented 5 years ago

... (migrating other repositories)

[Macaron] 2019-02-26 10:49:40: Started POST /repo/migrate for [::1]

...

2019/02/26 10:49:40 [I] [SQL] ROLL BACK 2019/02/26 10:49:40 [...routers/repo/repo.go:146 handleCreateError()] [E] MigratePost: repository already exists [uname: Mirror, name: repo] 2019/02/26 10:49:40 [D] Template: status/500

...

2019/02/26 10:50:10 [I] [SQL] COMMIT 2019/02/26 10:50:10 [T] Repository migrated [1285]: Mirror/repo [Macaron] 2019-02-26 10:50:10: Completed POST /repo/migrate 302 Found in 5m56.741603459s



## Description

Sometimes a strange situation happened to me when I migrating a repository

The post request of migrating will be sent twice and caused the error “repository already exists”.

Does anyone have any ideas?

http://geek.starbean.net/?p=393
This article could be help

## Screenshots

<!-- **If this issue involves the Web Interface, please include a screenshot** -->
techknowlogick commented 5 years ago

I'm able to replicate this by clicking the migrate button multiple times, perhaps when buttons such as that are clicked they could then be disabled.

yasuokav commented 5 years ago

I'm able to replicate this by clicking the migrate button multiple times, perhaps when buttons such as that are clicked they could then be disabled.

This is another problem because it will immediately send the POST request twice and display a 500 error page instead of sending the second POST request after a few minutes.

yasuokav commented 5 years ago

This issue can be closed after #6200 is merged.

yasuokav commented 4 years ago

I assume it has been fixed.