summaryrefslogtreecommitdiffstats
path: root/clustercontroller-reindexer/src
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-reindexer/src')
-rw-r--r--clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/Reindexer.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/Reindexer.java b/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/Reindexer.java
index eba9ab1f4bd..98c22884b01 100644
--- a/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/Reindexer.java
+++ b/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/Reindexer.java
@@ -136,12 +136,12 @@ public class Reindexer {
return;
case RUNNING:
log.log(WARNING, "Unexpected state 'RUNNING' of reindexing of " + type);
- case READY: // Intentional fallthrough — must just assume we failed updating state when exiting previously.
- log.log(FINE, () -> "Running reindexing of " + type);
+ break;
+ case READY:
+ status.updateAndGet(Status::running);
}
// Visit buckets until they're all done, or until we are shut down.
- status.updateAndGet(Status::running);
AtomicReference<Instant> progressLastStored = new AtomicReference<>(clock.instant());
VisitorControlHandler control = new VisitorControlHandler() {
@Override
@@ -164,10 +164,11 @@ public class Reindexer {
VisitorParameters parameters = createParameters(type, status.get().progress().orElse(null));
parameters.setControlHandler(control);
Runnable sessionShutdown = visitorSessions.apply(parameters); // Also starts the visitor session.
+ log.log(FINE, () -> "Running reindexing of " + type);
// Wait until done; or until termination is forced, in which we shut down the visitor session immediately.
phaser.arriveAndAwaitAdvance(); // Synchronize with visitor completion.
- sessionShutdown.run(); // Shutdown aborts the session unless already complete, then waits for it to terminate normally.
+ sessionShutdown.run(); // Shutdown aborts the session, then waits for it to terminate normally.
switch (control.getResult().getCode()) {
default: