Duplicate post request #2976

Closed
opened 2025-11-02 04:55:51 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @ghost on GitHub (Feb 26, 2019).

  • Gitea version (or commit ref): 594f591
  • Git version: 2.20.1
  • Operating system: macOS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
Start migrating repository "repo"
[Macaron] 2019-02-26 10:44:13: Started POST /repo/migrate for [::1]

... (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

Originally created by @ghost on GitHub (Feb 26, 2019). - Gitea version (or commit ref): 594f591 - Git version: 2.20.1 - Operating system: macOS - 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: ``` Start migrating repository "repo" [Macaron] 2019-02-26 10:44:13: Started POST /repo/migrate for [::1] ... (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** -->
GiteaMirror added the topic/uitype/proposal labels 2025-11-02 04:55:51 -06:00
Author
Owner

@techknowlogick commented on GitHub (Feb 27, 2019):

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.

@techknowlogick commented on GitHub (Feb 27, 2019): 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.
Author
Owner

@ghost commented on GitHub (Feb 28, 2019):

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.

@ghost commented on GitHub (Feb 28, 2019): > 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.
Author
Owner

@ghost commented on GitHub (Feb 28, 2019):

This issue can be closed after #6200 is merged.

@ghost commented on GitHub (Feb 28, 2019): This issue can be closed after #6200 is merged.
Author
Owner

@ghost commented on GitHub (Oct 28, 2019):

I assume it has been fixed.

@ghost commented on GitHub (Oct 28, 2019): I assume it has been fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2976