Power outage during merge request, causing the main branch to be unavailable and rendering the merge request function ineffective #13388

Closed
opened 2025-11-02 10:40:54 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @Dark-YiFeng on GitHub (Aug 15, 2024).

Description

合并请求时断电,导致commit号存在Gitea时是00000000000000000000000000,导致main分支不可用,点击报错404,合并请求功能也404,动态功能500.

解决方案:删掉该代码库中refs目录下,heads目录下,main文件的错误数据(0000000000000000),删掉logs目录下的对应错误数据,数据库中的错误数据也删除。

When merging requests, the power was cut off, resulting in the commit number being 00000000000000 in Gitea, causing the main branch to be unavailable. Clicking on it resulted in an error 404, and the merge request function was also 404, while the dynamic function was 500
Solution: Delete the error data (0000000) in the refs directory, heads directory, and main file of the code repository, delete the corresponding error data in the logs directory, and also delete the error data in the database.

Gitea Version

1.21.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

本地部署,内网环境。

Local deployment, internal network environment.

Database

None

Originally created by @Dark-YiFeng on GitHub (Aug 15, 2024). ### Description 合并请求时断电,导致commit号存在Gitea时是00000000000000000000000000,导致main分支不可用,点击报错404,合并请求功能也404,动态功能500. 解决方案:删掉该代码库中refs目录下,heads目录下,main文件的错误数据(0000000000000000),删掉logs目录下的对应错误数据,数据库中的错误数据也删除。 When merging requests, the power was cut off, resulting in the commit number being 00000000000000 in Gitea, causing the main branch to be unavailable. Clicking on it resulted in an error 404, and the merge request function was also 404, while the dynamic function was 500 Solution: Delete the error data (0000000) in the refs directory, heads directory, and main file of the code repository, delete the corresponding error data in the logs directory, and also delete the error data in the database. ### Gitea Version 1.21.0 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? 本地部署,内网环境。 Local deployment, internal network environment. ### Database None
GiteaMirror added the type/bugissue/needs-feedback labels 2025-11-02 10:40:54 -06:00
Author
Owner

@yp05327 commented on GitHub (Aug 22, 2024):

Is this a Gitea side bug? 🤔

@yp05327 commented on GitHub (Aug 22, 2024): Is this a Gitea side bug? 🤔
Author
Owner

@lunny commented on GitHub (Sep 17, 2024):

What did you mean the commit number being 00000000000000?

@lunny commented on GitHub (Sep 17, 2024): What did you mean `the commit number being 00000000000000`?
Author
Owner

@yp05327 commented on GitHub (Sep 18, 2024):

commit's SHA is 00000000000000000?

@yp05327 commented on GitHub (Sep 18, 2024): commit's SHA is 00000000000000000?
Author
Owner

@eeyrjmr commented on GitHub (Sep 18, 2024):

0000000000000 is reserved by git. I ran into a similar type of corruption a few years ago when I was using bare directories from a NAS (This is why I migrated to gitea)

@eeyrjmr commented on GitHub (Sep 18, 2024): 0000000000000 is reserved by git. I ran into a similar type of corruption a few years ago when I was using bare directories from a NAS (This is why I migrated to gitea)
Author
Owner

@wxiaoguang commented on GitHub (Oct 17, 2024):

Power outage could cause any damage to your system: file system, database, documents, etc. If a system is corrupted, you could only recover it by a backup, or drop these broken files.

@wxiaoguang commented on GitHub (Oct 17, 2024): Power outage could cause any damage to your system: file system, database, documents, etc. If a system is corrupted, you could only recover it by a backup, or drop these broken files.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13388