Commit b4056b69 authored by Dmitry Gruzd's avatar Dmitry Gruzd Committed by Dylan Griffith

Fix reindexing retry for the notes migration

parent 45b6085d
---
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