Commit 55af84cd authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '297646-fix-reindexing-retry' into 'master'

Fix reindexing retry for the notes migration

See merge request gitlab-org/gitlab!57248
parents d9cca0a2 b4056b69
---
title: Fix reindexing retry for the notes migration
merge_request: 57248
author:
type: fixed
......@@ -74,7 +74,7 @@ class MigrateNotesToSeparateIndex < Elastic::Migration
set_migration_state(
slice: slice,
task_id: task_id,
task_id: nil,
retry_attempt: retry_attempt + 1,
max_slices: max_slices
)
......
......@@ -147,6 +147,7 @@ RSpec.describe MigrateNotesToSeparateIndex do
migration.set_migration_state(slice: 0, max_slices: 2, task_id: 'task_id')
expect { migration.migrate }.to raise_error(/total is not equal/)
expect(migration.migration_state[:task_id]).to be_nil
end
end
......@@ -159,6 +160,7 @@ RSpec.describe MigrateNotesToSeparateIndex do
migration.set_migration_state(slice: 0, max_slices: 2, task_id: 'task_id')
expect { migration.migrate }.to raise_error(/failed with/)
expect(migration.migration_state[:task_id]).to be_nil
end
end
end
......
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