summaryrefslogtreecommitdiffstats
path: root/config-proxy
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2020-11-30 14:33:23 +0100
committerJon Bratseth <bratseth@gmail.com>2020-11-30 14:33:23 +0100
commite3743e075e1eeb088fbb9b2f4146ef1faeb08d9a (patch)
tree373c0c96520bf1efabecda9e568a986fdf5572bb /config-proxy
parenta3289b0060bd7a0e5eb2b6d638c05c9d76e3a8d4 (diff)
Revert "Merge pull request #15532 from vespa-engine/revert-15527-bratseth/apply-on-restart-take-5"
This reverts commit d91c72c22cae12468103ed4c43729e745916943e, reversing changes made to 9b47661ae5682e87cd963c63bdc2717896f468db.
Diffstat (limited to 'config-proxy')
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java6
-rw-r--r--config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigTester.java4
-rw-r--r--config-proxy/src/test/java/com/yahoo/vespa/config/proxy/MemoryCacheTest.java6
-rw-r--r--config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ProxyServerTest.java6
4 files changed, 13 insertions, 9 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java
index 30f4884c737..81ecd8620b9 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java
@@ -350,7 +350,11 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer
public void returnOkResponse(JRTServerConfigRequest request, RawConfig config) {
request.getRequestTrace().trace(TRACELEVEL, "Config proxy returnOkResponse()");
- request.addOkResponse(config.getPayload(), config.getGeneration(), config.isInternalRedeploy(), config.getConfigMd5());
+ request.addOkResponse(config.getPayload(),
+ config.getGeneration(),
+ config.isInternalRedeploy(),
+ config.applyOnRestart(),
+ config.getConfigMd5());
log.log(Level.FINE, () -> "Return response: " + request.getShortDescription() + ",configMd5=" + config.getConfigMd5() +
",generation=" + config.getGeneration());
log.log(Level.FINEST, () -> "Config payload in response for " + request.getShortDescription() + ":" + config.getPayload());
diff --git a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigTester.java b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigTester.java
index 33e798da15e..87a8764310a 100644
--- a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigTester.java
+++ b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigTester.java
@@ -44,11 +44,11 @@ public class ConfigTester {
String defMd5 = ConfigUtils.getDefMd5(defContent);
String configMd5 = ConfigUtils.getMd5(fooConfigPayload);
fooConfig = new RawConfig(configKey, defMd5, fooPayload, configMd5,
- generation, false, defContent, Optional.empty());
+ generation, false, false, defContent, Optional.empty());
String defName2 = "bar";
barConfig = new RawConfig(new ConfigKey<>(defName2, configId, namespace), defMd5, fooPayload, configMd5,
- generation, false, defContent, Optional.empty());
+ generation, false, false, defContent, Optional.empty());
}
JRTServerConfigRequest createRequest(RawConfig config) {
diff --git a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/MemoryCacheTest.java b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/MemoryCacheTest.java
index 485a091d9ae..c5e680f950a 100644
--- a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/MemoryCacheTest.java
+++ b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/MemoryCacheTest.java
@@ -63,9 +63,9 @@ public class MemoryCacheTest {
slime.setString("bar \"value2\"");
payloadDifferentMd5 = Payload.from(new ConfigPayload(slime));
- config = new RawConfig(configKey, defMd5, payload, configMd5, generation, false, defContent, Optional.empty());
- config2 = new RawConfig(configKey2, defMd52, payload2, configMd5, generation, false, defContent, Optional.empty());
- configDifferentMd5 = new RawConfig(configKey, differentDefMd5, payloadDifferentMd5, configMd5, generation, false, defContent, Optional.empty());
+ config = new RawConfig(configKey, defMd5, payload, configMd5, generation, false, false, defContent, Optional.empty());
+ config2 = new RawConfig(configKey2, defMd52, payload2, configMd5, generation, false, false, defContent, Optional.empty());
+ configDifferentMd5 = new RawConfig(configKey, differentDefMd5, payloadDifferentMd5, configMd5, generation, false, false, defContent, Optional.empty());
cacheKey = new ConfigCacheKey(configKey, config.getDefMd5());
cacheKey2 = new ConfigCacheKey(configKey2, config2.getDefMd5());
diff --git a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ProxyServerTest.java b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ProxyServerTest.java
index f52598b3ee5..c858f894fc4 100644
--- a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ProxyServerTest.java
+++ b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ProxyServerTest.java
@@ -36,7 +36,7 @@ public class ProxyServerTest {
private static final ConfigKey<?> errorConfigKey = new ConfigKey<>("error", fooConfig.getConfigId(), fooConfig.getNamespace());
static final RawConfig errorConfig = new RawConfig(errorConfigKey, fooConfig.getDefMd5(),
fooConfig.getPayload(), fooConfig.getConfigMd5(),
- fooConfig.getGeneration(), false, ErrorCode.UNKNOWN_DEFINITION, fooConfig.getDefContent(), Optional.empty());
+ fooConfig.getGeneration(), false, false, ErrorCode.UNKNOWN_DEFINITION, fooConfig.getDefContent(), Optional.empty());
@Rule
public TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -180,7 +180,7 @@ public class ProxyServerTest {
// Simulate an empty response
RawConfig emptyConfig = new RawConfig(fooConfig.getKey(), fooConfig.getDefMd5(),
Payload.from("{}"), fooConfig.getConfigMd5(),
- 0, false, 0, fooConfig.getDefContent(), Optional.empty());
+ 0, false, false, 0, fooConfig.getDefContent(), Optional.empty());
source.put(fooConfig.getKey(), emptyConfig);
res = proxy.resolveConfig(tester.createRequest(fooConfig));
@@ -239,7 +239,7 @@ public class ProxyServerTest {
static RawConfig createConfigWithNextConfigGeneration(RawConfig config, int errorCode, Payload payload, long configGeneration) {
return new RawConfig(config.getKey(), config.getDefMd5(),
payload, config.getConfigMd5(),
- configGeneration, false,
+ configGeneration, false, false,
errorCode, config.getDefContent(), Optional.empty());
}