aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootstrap-cmake.sh2
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java2
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java26
3 files changed, 24 insertions, 6 deletions
diff --git a/bootstrap-cmake.sh b/bootstrap-cmake.sh
index bc127da7a0b..13e49767964 100644
--- a/bootstrap-cmake.sh
+++ b/bootstrap-cmake.sh
@@ -25,6 +25,6 @@ cmake3 \
-DJAVA_HOME=/usr/lib/jvm/java-openjdk \
-DEXTRA_LINK_DIRECTORY="/opt/vespa-boost/lib;/opt/vespa-cppunit/lib;/usr/lib64/llvm3.9/lib" \
-DEXTRA_INCLUDE_DIRECTORY="/opt/vespa-boost/include;/opt/vespa-cppunit/include;/usr/include/llvm3.9" \
- -DCMAKE_INSTALL_RPATH="/opt/vespa/lib64;/opt/vespa-boost/lib;/opt/vespa-cppunit/lib;/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server;/usr/include/llvm3.9" \
+ -DCMAKE_INSTALL_RPATH="/opt/vespa/lib64;/opt/vespa-boost/lib;/opt/vespa-cppunit/lib;/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server;/usr/lib64/llvm3.9/lib" \
${EXTRA_CMAKE_ARGS} \
"${SOURCE_DIR}"
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java
index 0b2a620f92c..b9aa23c93d6 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantBuilder.java
@@ -176,6 +176,8 @@ public class TenantBuilder {
tenant,
applicationRepo,
componentRegistry.getMetrics().getOrCreateMetricUpdater(Metrics.createDimensions(tenant)),
+ // TODO: Check if we can avoid using one executor service per tenant. Either one for all
+ // or have a few executors and hash on tenant name to find out which one to use here
createSingleThreadedExecutorService(RemoteSessionRepo.class.getName()));
}
}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java
index a1cc192be2a..d2c09aae22a 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java
@@ -9,16 +9,32 @@ package com.yahoo.vespa.hosted.node.admin.component;
* - Define task classes that implement IdempotentTask<T>.
*/
public interface IdempotentTask<T extends TaskContext> {
- String name();
+ /**
+ * A short id of the task to e.g. identify the task in the log.
+ *
+ * Prefer PascalCase and without white-space.
+ *
+ * Example: "EnableDocker"
+ */
+ default String name() { return getClass().getSimpleName(); }
/**
- * Execute an administrative task to converge the system towards some ideal state.
+ * Execute an administrative task to converge towards some ideal state, whether it is
+ * system state or in-memory Java state.
*
* converge() must be idempotent: it may be called any number of times, or
- * interrupted at any time e.g. by `kill -9`. The caller must ensure there is at
- * most one invocation of converge() on this instance at any given time.
+ * interrupted at any time e.g. by `kill -9`.
+ *
+ * converge() is not thread safe: The caller must ensure there is at most one invocation
+ * of converge() at any given time.
*
- * @return false if the system was already converged, i.e. converge() was a no-op.
+ * @return false if already converged, i.e. was a no-op. A typical sequence of converge()
+ * calls on a IdempotentTask will consist of:
+ * - Any number of calls that throws an exception due to some issues. Assuming
+ * no exceptions were thrown, or the issue eventually resolved itself...
+ * (convergence failure)
+ * - Returns true once (converged just now)
+ * - Returns false for all further calls (already converged)
* @throws RuntimeException (or a subclass) if the task is unable to converge.
*/
boolean converge(T context);