summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2021-09-13 14:33:15 +0200
committerHarald Musum <musum@yahooinc.com>2021-09-13 14:33:15 +0200
commita6af329731265671c3e1609bd2e59df04723d73a (patch)
tree70336b616d4048a99376613d39544d2cac95820a /configserver
parente5154033584d4caddbab673713f74e48f07b4388 (diff)
Remove md5 sum of config from initial state in config subscription
Java applications will now request config with only xxhash64 of config, C++ applications will request config with md5 of config and config proxy will use what is in the request from the clients.
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactory.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactory.java b/configserver/src/main/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactory.java
index e52b2c4af01..8c1cdeb753a 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactory.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactory.java
@@ -59,10 +59,14 @@ public interface ConfigResponseFactory {
|| ( ! requestChecksumMd5.isEmpty() && ! requestChecksumXxhash64.isEmpty())) {
md5 = new PayloadChecksum(ConfigUtils.getMd5(rawPayload), MD5);
xxhash64 = new PayloadChecksum(ConfigUtils.getXxhash64(rawPayload), XXHASH64);
- } else if ( ! requestChecksumMd5.isEmpty())
+ } else if ( ! requestChecksumMd5.isEmpty()) {
md5 = new PayloadChecksum(ConfigUtils.getMd5(rawPayload), MD5);
- else
+ } else if (requestChecksumMd5.isEmpty() && !requestChecksumXxhash64.isEmpty()) {
xxhash64 = new PayloadChecksum(ConfigUtils.getXxhash64(rawPayload), XXHASH64);
+ } else {
+ md5 = new PayloadChecksum(ConfigUtils.getMd5(rawPayload), MD5);
+ xxhash64 = new PayloadChecksum(ConfigUtils.getXxhash64(rawPayload), XXHASH64);
+ }
return PayloadChecksums.from(md5, xxhash64);
}