-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Initial Git hook syncing causes downtime for large instances #21702
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
Comments
If at all, this should be done async, after the software is back online IMHO. Or the value for the config should not be empty on first run. Another solution I proposed a while ago: #18995 |
You can also run the sync task on admin panel. And for a large instance, maybe more than 1 instance is better so that you could upgrade one by one. |
My point is: Our app location didn't change, it is where it always was, so we don't even need to update 47k project's hooks. This sync is only triggered because our alleged app location is empty. |
It should have been checked if the configuration file path changed. ref https://github.com/go-gitea/gitea/pull/21626/files#diff-3d9812b7e268b55c71e312a7dd154900ab1036c47493f4cb91f608b32a7541fcR91 |
Yes, and as you surely read in my initial report, it is considered "empty" for some reason. But the config file wasn't moved.
|
Ah, yes. It's a problem for the first running. The new system state item was introduced from that PR, so before it's empty, but next time it should be right value. |
Yes, but in order to reach next time, we need to face a prolonged downtime in order to sync the hooks of many repositories, this is what the bug report is about. |
It helps poor users like #22049 |
The implemented feature helps users, yes. The bug that the initial value is empty does not help anyone, but is a bug. |
But what's the proper initial value? Gitea knows nothing about the correct config path at the beginning. Users are usually affected by such bug when then do upgrade:
ps: it could be a rare case, but it could happen, it only happens for users who first upgrade to Gitea with config path sync support and they change the config path. |
The newly installed big instances will not be affected by this if they doesn't change the configuration file path. |
Close as there is no new proposal. |
Description
#21619, #21625 & #21626 seem to do a Git hook sync on first run, because previous app config path is empty.
In our logs, we see
and for several tens of thousands of repositories, this takes quite a while, and caused unexpected downtime.
We reverted the patch for now in https://codeberg.org/Codeberg/gitea/commit/26b92e3f80961de11a48d3d307d50065aca8922a
Gitea Version
1.17.3 7a2daae
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Custom build
Database
MySQL
The text was updated successfully, but these errors were encountered: