Skip to content
代码片段 群组 项目
未验证 提交 1993feb5 编辑于 作者: Stan Hu's avatar Stan Hu
浏览文件

Optimize JIRA ref lookup

In a project with JIRA activated, `ProcessCommitWorker` attempts to add
a comment to a JIRA issue if that issue is mentioned in a
commit. However, the JIRA integration would attempt to retrieve all tags
and branches and pick the first matching ref given a commit OID.

The problem with that approach is that after each push, the list of all
branches and tags are expired and could take a while to gather. Since
multiple `ProcessCommitWorker` jobs can be running at the same time,
this can lead to high I/O on Gitaly nodes since multiple
`ProcessCommitWorker` jobs can run at the same time.

We observe that we don't really need to build the entire ref list; we
can just ask Gitaly for a single matching ref for the given OID with the
newly-created `FindRefsByOID` RPC introduced in
https://gitlab.com/gitlab-org/gitaly/-/merge_requests/3947.

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/343035

Changelog: performance
上级 8dbc57a9
No related branches found
No related tags found
无相关合并请求
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册