Skip to content

Project with many branches can lock server running "git branch --contains XXX"

Brett Walker requested to merge 37824-many-branches-lock-server into master

What does this MR do?

When displaying a commit, we do a git branch --contains XXX to get the branches and tags that are related to this commit. However, when there are thousands of branches or tags, this query can take a long time, and peg a cpu core. This could cause severe performance issues.

We now check how many branches or tags are available, and do not perform the query if there are too many.

Are there points in the code the reviewer needs to double check?

no

Why was this MR needed?

This was reported by a customer: ZD: https://gitlab.zendesk.com/agent/tickets/82394

Screenshots (if relevant)

With no branches or tags to show Screen_Shot_2017-11-04_at_2.11.35_PM

With branches or tags to show: Screen_Shot_2017-11-04_at_2.20.50_PM

When no branches or tags are available

Screen_Shot_2017-11-07_at_12.38.24_PM

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #37824 (closed)

To do

Edited by Taurie Davis

Merge request reports