Skip to content
代码片段 群组 项目
未验证 提交 789a95cc 编辑于 作者: Dylan Griffith's avatar Dylan Griffith 提交者: GitLab
浏览文件

Merge branch 'ka/partition-manager-update-timing-for-lock-retries' into 'master'

Update partition manager lock retries config

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/160342



Merged-by: default avatarDylan Griffith <dyl.griffith@gmail.com>
Approved-by: default avatarAdam Hegyi <ahegyi@gitlab.com>
Approved-by: default avatarDylan Griffith <dyl.griffith@gmail.com>
Co-authored-by: default avatarKrasimir Angelov <kangelov@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -13,6 +13,19 @@ class PartitionManager
MANAGEMENT_LEASE_KEY = 'database_partition_management_%s'
RETAIN_DETACHED_PARTITIONS_FOR = 1.week
LOCK_RETRIES_TIMING_CONFIGURATION = [
[0.1.seconds, 0.05.seconds],
[0.1.seconds, 0.05.seconds],
[0.2.seconds, 0.05.seconds],
[0.3.seconds, 0.10.seconds],
[0.4.seconds, 0.15.seconds],
[0.5.seconds, 2.seconds],
[0.5.seconds, 2.seconds],
[0.5.seconds, 2.seconds],
[0.5.seconds, 2.seconds],
[1.second, 5.seconds]
].freeze
def initialize(model, connection: nil)
@model = model
@connection = connection || model.connection
......@@ -135,6 +148,7 @@ def assert_partition_detachable!(partition)
def with_lock_retries(&block)
Gitlab::Database::WithLockRetries.new(
timing_configuration: LOCK_RETRIES_TIMING_CONFIGURATION * 2,
klass: self.class,
logger: Gitlab::AppLogger,
connection: connection
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册