Commit 7160f1ad authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '327106-reduce-timeout-on-search-count' into 'master'

Reduce timeouts on SearchController#count to 5s

See merge request gitlab-org/gitlab!59435
parents b097374a f11a6568
......@@ -47,7 +47,11 @@ class SearchController < ApplicationController
params.require([:search, :scope])
scope = search_service.scope
count = search_service.search_results.formatted_count(scope)
count = 0
ApplicationRecord.with_fast_read_statement_timeout do
count = search_service.search_results.formatted_count(scope)
end
# Users switching tabs will keep fetching the same tab counts so it's a
# good idea to cache in their browser just for a short time. They can still
......
---
title: Reduce timeouts on tab counts for searches to 5s
merge_request: 59435
author:
type: performance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment