Recover gracefully when issuable counts are too expensive
On the MR list page, we like to display how many issues were found from the filtered search query *in total*. However, especially when the filter includes conditions on the MR title or description, this can be very expensive to calculate, and involve reading gigabytes of text data from the database. As long as the data is already in the page cache, this usually finishes within the 15-second timeout on GitLab.com, but if the database cache is cold, a statement timeout is the usual occurrence. More generally, it's not very clever to spend so much time calculating a piece of information with marginal value. This MR applies a shorter limit to the counting statements and provides for graceful fallback to a '?' value, with a nice tooltip, if the query times out. This means we're able to view the results in a reasonable time, rather than the page taking a long time to load, or not loading at all.
Showing
Please register or sign in to comment