High number of Pipeline#stuck? calls for new merge requests
I noticed after creating https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31220/diffs, there were 700 SQL calls!
There were numerous calls here:
as well as here:
My guess is that the following code may load every build and related runner without regard to doing this in a batched fashion:
def stuck?
pending_builds.any?(&:stuck?)
end
Edited by 🤖 GitLab Bot 🤖


