-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Use join for the deleting issue actions query #26277
Comments
Thank you for the report. The referred fix on codeberg seems not good enough (eg: the test doesn't cover other databases). I proposed a new fix: Bypass MariaDB performance bug of the "IN" sub-query #26279 I didn't use "JOIN" because I think it's better to avoid using too many dialects for difference database, while pre-querying the IDs is fast enough. |
|
OK. I see, it's MariaDB's problem. |
…ssueIndex (#26279) (#26368) Backport #26279 by @wxiaoguang Close #26277 Fix #26285 Co-authored-by: wxiaoguang <[email protected]>
…ssueIndex (go-gitea#26279) (go-gitea#26368) Backport go-gitea#26279 by @wxiaoguang Close go-gitea#26277 Fix go-gitea#26285 Co-authored-by: wxiaoguang <[email protected]> (cherry picked from commit cb1a4da)
Description
Our current DELETE query for actions is rather inefficient on MariaDB:
gitea/models/activities/action.go
Lines 688 to 702 in ab388de
Caused by https://jira.mariadb.org/browse/MDEV-16289
see https://codeberg.org/forgejo/forgejo/issues/1161 and https://codeberg.org/forgejo/forgejo/pulls/1165
Gitea Version
1.20.2
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?
Binary started via systemd behind a caddy reverse proxy.
Database
None
The text was updated successfully, but these errors were encountered: