Skip to content

Commit 826115d

Browse files
committed
Avoiding a race condition where pending indices count is 0 at start of reindex
1 parent ba5a9c8 commit 826115d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/task/ReindexDataStreamTask.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public ReindexDataStreamTask(
5555
this.persistentTaskStartTime = persistentTaskStartTime;
5656
this.initialTotalIndices = initialTotalIndices;
5757
this.initialTotalIndicesToBeUpgraded = initialTotalIndicesToBeUpgraded;
58+
this.pending.set(initialTotalIndicesToBeUpgraded);
5859
this.completeTask = new RunOnce(() -> {
5960
if (exception == null) {
6061
markAsCompleted();

0 commit comments

Comments
 (0)