Skip to content
代码片段 群组 项目
提交 78632ed8 编辑于 作者: Stan Hu's avatar Stan Hu 提交者: Peter Leitzen
浏览文件

Delete project and system hook logs in batches

When a user attempts to destroy a Web hook, the database will attempt to
delete all the associated Web hook logs. However, as we have seen in
https://gitlab.com/gitlab-org/gitlab/-/issues/21940, the table may be
too bloated or the number of rows too large that this deletion can time
out due to a 15-second statement timeout.

We rectify this situation by deleting these logs in batches of 1000
outside of a transaction. That should be acceptable since old logs get
pruned periodically anyway, and when a Web hook is destroyed it's more
important that the destruction makes progress and eventually removes the
hook.

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/21940
上级 7b6438ae
No related branches found
No related tags found
无相关合并请求
显示
275 个添加9 个删除
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册