aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-reindexer
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2020-11-06 11:20:46 +0100
committerGitHub <noreply@github.com>2020-11-06 11:20:46 +0100
commitcab5c5ae03d0b6bb76f0fbda57e99f6302349bab (patch)
treeaafa91fcc5e6920583891e341442c90d5e37ab9a /clustercontroller-reindexer
parent6ad9ce9460a3d8a3743234960164a14dfa952151 (diff)
Add some comments, and fine-log when resuming reindexing
Diffstat (limited to 'clustercontroller-reindexer')
-rw-r--r--clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/Reindexer.java10
1 files changed, 5 insertions, 5 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 8bcba483156..6f468f5b103 100644
--- a/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/Reindexer.java
+++ b/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/Reindexer.java
@@ -34,7 +34,7 @@ import static java.util.stream.Collectors.joining;
/**
* Progresses reindexing efforts by creating visitor sessions against its own content cluster,
* which send documents straight to storage — via indexing if the documenet type has "index" mode.
- * The {@link #reindex} method blocks until unterrupted, or util no more reindexing is left to do.
+ * The {@link #reindex} method blocks until interrupted, or until no more reindexing is left to do.
*
* @author jonmv
*/
@@ -54,7 +54,7 @@ public class Reindexer {
cluster.bucketOf(type); // Verifies this is known.
this.cluster = cluster;
- this.ready = new TreeMap<>(ready);
+ this.ready = new TreeMap<>(ready); // Iterate through document types in consistent order.
this.database = database;
this.access = access;
this.clock = clock;
@@ -94,11 +94,12 @@ public class Reindexer {
log.log(WARNING, "Unknown reindexing state '" + status.state() + "'");
case FAILED:
log.log(FINE, () -> "Not continuing reindexing of " + type + " due to previous failure");
- case SUCCESSFUL: // Intentional fallthrough — both are done states.
+ case SUCCESSFUL: // Intentional fallthrough — all three are done states.
return status;
case RUNNING:
log.log(WARNING, "Unepxected 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 + ", which started at " + status.startedAt());
}
// Visit buckets until they're all done, or until we are interrupted.
@@ -119,7 +120,7 @@ public class Reindexer {
log.log(WARNING, "Visiting failed: " + control.getResult().getMessage());
return status.failed(clock.instant(), control.getResult().getMessage());
case ABORTED:
- log.log(FINE, () -> "Aborting reindexing of " + type + " due to shutdown — will continue later");
+ log.log(FINE, () -> "Halting reindexing of " + type + " due to shutdown — will continue later");
return status.halted();
case SUCCESS:
log.log(INFO, "Completed reindexing of " + type + " after " + Duration.between(status.startedAt(), clock.instant()));
@@ -213,4 +214,3 @@ public class Reindexer {
}
}
-