summaryrefslogtreecommitdiff
path: root/lib/gitlab/database/async_indexes/index_creator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/database/async_indexes/index_creator.rb')
-rw-r--r--lib/gitlab/database/async_indexes/index_creator.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/gitlab/database/async_indexes/index_creator.rb b/lib/gitlab/database/async_indexes/index_creator.rb
index 2fb4cc8f675..3ae2bb7b3e5 100644
--- a/lib/gitlab/database/async_indexes/index_creator.rb
+++ b/lib/gitlab/database/async_indexes/index_creator.rb
@@ -4,10 +4,10 @@ module Gitlab
module Database
module AsyncIndexes
class IndexCreator
- include ExclusiveLeaseGuard
+ include IndexingExclusiveLeaseGuard
TIMEOUT_PER_ACTION = 1.day
- STATEMENT_TIMEOUT = 9.hours
+ STATEMENT_TIMEOUT = 20.hours
def initialize(async_index)
@async_index = async_index
@@ -47,10 +47,6 @@ module Gitlab
TIMEOUT_PER_ACTION
end
- def lease_key
- [super, async_index.connection_db_config.name].join('/')
- end
-
def set_statement_timeout
connection.execute("SET statement_timeout TO '%ds'" % STATEMENT_TIMEOUT)
yield