Skip to content

Draft: Rescue from different types of search timeouts

John Mason requested to merge jm-rescue-search-timeouts into master

What does this MR do and why?

Searches often result in timeout errors that are raised in various classes. We currently only rescue from ActiveRecord::QueryCancelled. This MR rescues from the various timeout error classes that are currently known and re-raises as a Gitlab::Search::TimeoutError.

The API and Web controllers both rescue from Gitlab::Search::TimeoutError and respond with a timeout message.

Example of timeout messages https://log.gprd.gitlab.net/goto/eb9961f0-bcf5-11ec-b73f-692cc1ae8214 (internal link)

Screenshots or screen recordings

image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by John Mason

Merge request reports