diff options
author | Harald Musum <musum@oath.com> | 2018-06-10 19:42:55 +0200 |
---|---|---|
committer | Harald Musum <musum@oath.com> | 2018-06-10 19:42:55 +0200 |
commit | 38d482d4e1ae1b34edba6c02e7404ce3c4e42bc3 (patch) | |
tree | b4896d484b10f405421b3993566bd82ca332a06b /config | |
parent | 0495fd6fff27596863cabdfe6a2938bb1b7df1df (diff) |
Add internal redeploy flag to vespa-get-config debug output
Diffstat (limited to 'config')
-rw-r--r-- | config/src/apps/vespa-get-config/getconfig.cpp | 3 | ||||
-rw-r--r-- | config/src/vespa/config/common/configstate.h | 9 | ||||
-rw-r--r-- | config/src/vespa/config/frt/protocol.cpp | 1 | ||||
-rw-r--r-- | config/src/vespa/config/frt/protocol.h | 1 | ||||
-rw-r--r-- | config/src/vespa/config/frt/slimeconfigresponse.cpp | 2 |
5 files changed, 11 insertions, 5 deletions
diff --git a/config/src/apps/vespa-get-config/getconfig.cpp b/config/src/apps/vespa-get-config/getconfig.cpp index 24e4623372e..4c42779ce91 100644 --- a/config/src/apps/vespa-get-config/getconfig.cpp +++ b/config/src/apps/vespa-get-config/getconfig.cpp @@ -216,7 +216,7 @@ GetConfig::Main() FRTConfigRequestFactory requestFactory(protocolVersion, traceLevel, vespaVersion, config::protocol::readProtocolCompressionType()); FRTConnection connection(spec, *_supervisor, TimingValues()); ConfigKey key(configId, defName, defNamespace, defMD5, defSchema); - ConfigState state(configMD5, 0); + ConfigState state(configMD5, 0, false); FRTConfigRequest::UP request = requestFactory.createConfigRequest(key, &connection, state, serverTimeout * 1000); _target->InvokeSync(request->getRequest(), clientTimeout); // seconds @@ -240,6 +240,7 @@ GetConfig::Main() printf("configMD5 %s\n", rState.md5.c_str()); printf("generation %ld\n", rState.generation); + printf("internalRedeploy %s\n", rState.internalRedeploy == 0 ? "false" : "true"); printf("trace %s\n", response->getTrace().toString().c_str()); } else if (traceLevel > 0) { printf("trace %s\n", response->getTrace().toString().c_str()); diff --git a/config/src/vespa/config/common/configstate.h b/config/src/vespa/config/common/configstate.h index 77572fabf8e..fe415f038e3 100644 --- a/config/src/vespa/config/common/configstate.h +++ b/config/src/vespa/config/common/configstate.h @@ -14,15 +14,18 @@ struct ConfigState public: ConfigState() : md5(""), - generation(0) + generation(0), + internalRedeploy(false) { } - ConfigState(const vespalib::string & md5sum, int64_t gen) + ConfigState(const vespalib::string & md5sum, int64_t gen, bool value) : md5(md5sum), - generation(gen) + generation(gen), + internalRedeploy(value) { } vespalib::string md5; int64_t generation; + bool internalRedeploy; bool isNewerGenerationThan(const ConfigState & other) const { return isGenerationNewer(generation, other.generation); diff --git a/config/src/vespa/config/frt/protocol.cpp b/config/src/vespa/config/frt/protocol.cpp index 2241715fb1b..9f8ea9a06fa 100644 --- a/config/src/vespa/config/frt/protocol.cpp +++ b/config/src/vespa/config/frt/protocol.cpp @@ -40,6 +40,7 @@ const Memory RESPONSE_CONFIG_MD5 = "configMD5"; const Memory RESPONSE_CONFIG_GENERATION = "generation"; const Memory RESPONSE_PAYLOAD = "payload"; const Memory RESPONSE_TRACE = "trace"; +const Memory RESPONSE_INTERNAL_REDEPLOY = "internalRedeploy"; const Inspector & extractPayload(const Slime & data) diff --git a/config/src/vespa/config/frt/protocol.h b/config/src/vespa/config/frt/protocol.h index c7a6bc43fde..2c96d355a1d 100644 --- a/config/src/vespa/config/frt/protocol.h +++ b/config/src/vespa/config/frt/protocol.h @@ -53,6 +53,7 @@ extern const vespalib::Memory RESPONSE_CONFIG_MD5; extern const vespalib::Memory RESPONSE_CONFIG_GENERATION; extern const vespalib::Memory RESPONSE_PAYLOAD; extern const vespalib::Memory RESPONSE_TRACE; +extern const vespalib::Memory RESPONSE_INTERNAL_REDEPLOY; const vespalib::slime::Inspector & extractPayload(const vespalib::Slime & data); diff --git a/config/src/vespa/config/frt/slimeconfigresponse.cpp b/config/src/vespa/config/frt/slimeconfigresponse.cpp index 6de8f0854f1..e16e97164d5 100644 --- a/config/src/vespa/config/frt/slimeconfigresponse.cpp +++ b/config/src/vespa/config/frt/slimeconfigresponse.cpp @@ -64,7 +64,7 @@ const ConfigState SlimeConfigResponse::readState() const { const Slime & data(*_data); - return ConfigState(data.get()[RESPONSE_CONFIG_MD5].asString().make_string(), data.get()[RESPONSE_CONFIG_GENERATION].asLong()); + return ConfigState(data.get()[RESPONSE_CONFIG_MD5].asString().make_string(), data.get()[RESPONSE_CONFIG_GENERATION].asLong(), data.get()[RESPONSE_INTERNAL_REDEPLOY].asBool()); } vespalib::string |