Skip to content
代码片段 群组 项目
提交 87d1a409 编辑于 作者: Vasilii Iakliushin's avatar Vasilii Iakliushin
浏览文件

Cleanup "use_lock_for_update_repository_storage" feature flag

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/431198

**Problem**

It's possible to run multiple migration workers for the same
project/snippet/group simultaneously
The worker can be killed and rescheduled by Sidekiq interrupt signal.
It will leave the migration in an inconsistent state.

**Solution**

Use an exclusive lock in storage migration workers. The exclusive lease
key includes a project/snippet/group id to prevent simultaneous updates.
The key value is a Sidekiq worker jid to track the owner of the update.
This setup should handle following situations:

Worker tries to migrate a repository under existing
migration (result: job is marked as failed)
Worker started a migration but was interrupted and
rescheduled. (result: job is marked as failed, lock is released)

Changelog: changed
上级 dff22bf8
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册