diff options
author | Harald Musum <musum@verizonmedia.com> | 2019-01-29 09:09:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-29 09:09:31 +0100 |
commit | d4e02b6d0fed6d5e7386882eaaf2fd4588fbba7f (patch) | |
tree | a8335f42363395dc68ee64dd15fccd80e8e1a256 /config | |
parent | 9075d14f23caed487504331dbe4216f247620e49 (diff) | |
parent | b99d402e618188b32afc95f0f7356ee84a114643 (diff) |
Merge pull request #8253 from vespa-engine/hmusum/remove-field-from-config-protocol
Remove unused field
Diffstat (limited to 'config')
12 files changed, 4 insertions, 38 deletions
diff --git a/config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequest.java b/config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequest.java index 26fa41c19c7..0e88eeb4e98 100644 --- a/config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequest.java +++ b/config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequest.java @@ -86,13 +86,6 @@ public interface JRTConfigRequest { long getProtocolVersion(); /** - * Get the wanted generation for this request. - * - * @return a generation that client would like. - */ - long getWantedGeneration(); - - /** * Get the host name of the client that is requesting config. * @return hostname of the client. */ diff --git a/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeClientConfigRequest.java b/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeClientConfigRequest.java index 584ab1414aa..9a2c4cc63de 100644 --- a/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeClientConfigRequest.java +++ b/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeClientConfigRequest.java @@ -94,11 +94,6 @@ public abstract class SlimeClientConfigRequest implements JRTClientConfigRequest } @Override - public long getWantedGeneration() { - return requestData.getWantedGeneration(); - } - - @Override public Request getRequest() { return request; } diff --git a/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeRequestData.java b/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeRequestData.java index ec6559f4ed7..a9b46f25751 100644 --- a/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeRequestData.java +++ b/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeRequestData.java @@ -26,7 +26,6 @@ class SlimeRequestData { private static final String REQUEST_CLIENT_CONFIGID = "configId"; private static final String REQUEST_CLIENT_HOSTNAME = "clientHostname"; private static final String REQUEST_CURRENT_GENERATION = "currentGeneration"; - private static final String REQUEST_WANTED_GENERATION = "wantedGeneration"; private static final String REQUEST_CONFIG_MD5 = "configMD5"; private static final String REQUEST_TRACE = "trace"; private static final String REQUEST_TIMEOUT = "timeout"; @@ -73,10 +72,6 @@ class SlimeRequestData { return getRequestField(REQUEST_CLIENT_HOSTNAME).asString(); } - long getWantedGeneration() { - return getRequestField(REQUEST_WANTED_GENERATION).asLong(); - } - long getTimeout() { return getRequestField(REQUEST_TIMEOUT).asLong(); } @@ -110,7 +105,6 @@ class SlimeRequestData { defSchema.serialize(request.setArray(REQUEST_DEF_CONTENT)); request.setString(REQUEST_CONFIG_MD5, configMd5); request.setLong(REQUEST_CURRENT_GENERATION, generation); - request.setLong(REQUEST_WANTED_GENERATION, 0L); // TODO: Remove when latest version in use is 6.328.19 request.setLong(REQUEST_TIMEOUT, timeout); request.setString(REQUEST_COMPRESSION_TYPE, compressionType.name()); vespaVersion.ifPresent(version -> request.setString(REQUEST_VESPA_VERSION, version.toString())); diff --git a/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeServerConfigRequest.java b/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeServerConfigRequest.java index 41bf38ef1dc..34d6f90cbcb 100644 --- a/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeServerConfigRequest.java +++ b/config/src/main/java/com/yahoo/vespa/config/protocol/SlimeServerConfigRequest.java @@ -79,11 +79,6 @@ abstract class SlimeServerConfigRequest implements JRTServerConfigRequest { } @Override - public long getWantedGeneration() { - return requestData.getWantedGeneration(); - } - - @Override public String getClientHostName() { return requestData.getClientHostName(); } diff --git a/config/src/tests/frt/frt.cpp b/config/src/tests/frt/frt.cpp index b616861c799..090991b7fe4 100644 --- a/config/src/tests/frt/frt.cpp +++ b/config/src/tests/frt/frt.cpp @@ -270,12 +270,11 @@ TEST("require that v3 request is correctly initialized") { ConfigKey key = ConfigKey::create<MyConfig>("foobi"); vespalib::string md5 = "mymd5"; int64_t currentGeneration = 3; - int64_t wantedGeneration = 4; vespalib::string hostName = "myhost"; int64_t timeout = 3000; Trace traceIn(3); traceIn.trace(2, "Hei"); - FRTConfigRequestV3 v3req(&conn, key, md5, currentGeneration, wantedGeneration, hostName, + FRTConfigRequestV3 v3req(&conn, key, md5, currentGeneration, hostName, timeout, traceIn, VespaVersion::fromString("1.2.3"), CompressionType::LZ4); ASSERT_TRUE(v3req.verifyState(ConfigState(md5, 3, false))); ASSERT_FALSE(v3req.verifyState(ConfigState(md5, 2, false))); @@ -298,7 +297,6 @@ TEST("require that v3 request is correctly initialized") { EXPECT_EQUAL(key.getConfigId(), root[REQUEST_CLIENT_CONFIGID].asString().make_string()); EXPECT_EQUAL(hostName, root[REQUEST_CLIENT_HOSTNAME].asString().make_string()); EXPECT_EQUAL(currentGeneration, root[REQUEST_CURRENT_GENERATION].asLong()); - EXPECT_EQUAL(wantedGeneration, root[REQUEST_WANTED_GENERATION].asLong()); EXPECT_EQUAL(md5, root[REQUEST_CONFIG_MD5].asString().make_string()); EXPECT_EQUAL(timeout, root[REQUEST_TIMEOUT].asLong()); EXPECT_EQUAL("LZ4", root[REQUEST_COMPRESSION_TYPE].asString().make_string()); diff --git a/config/src/vespa/config/frt/frtconfigrequestfactory.cpp b/config/src/vespa/config/frt/frtconfigrequestfactory.cpp index 1f1ddb196b0..4b5d1621c62 100644 --- a/config/src/vespa/config/frt/frtconfigrequestfactory.cpp +++ b/config/src/vespa/config/frt/frtconfigrequestfactory.cpp @@ -26,7 +26,7 @@ FRTConfigRequest::UP FRTConfigRequestFactory::createConfigRequest(const ConfigKey & key, Connection * connection, const ConfigState & state, int64_t serverTimeout) const { - return make_unique<FRTConfigRequestV3>(connection, key, state.md5, state.generation, 0u, _hostName, + return make_unique<FRTConfigRequestV3>(connection, key, state.md5, state.generation, _hostName, serverTimeout, Trace(_traceLevel), _vespaVersion, _compressionType); } diff --git a/config/src/vespa/config/frt/frtconfigrequestv3.cpp b/config/src/vespa/config/frt/frtconfigrequestv3.cpp index 413c74c796d..e52ce5d1114 100644 --- a/config/src/vespa/config/frt/frtconfigrequestv3.cpp +++ b/config/src/vespa/config/frt/frtconfigrequestv3.cpp @@ -13,13 +13,12 @@ FRTConfigRequestV3::FRTConfigRequestV3(Connection * connection, const ConfigKey & key, const vespalib::string & configMd5, int64_t currentGeneration, - int64_t wantedGeneration, const vespalib::string & hostName, int64_t serverTimeout, const Trace & trace, const VespaVersion & vespaVersion, const CompressionType & compressionType) - : SlimeConfigRequest(connection, key, configMd5, currentGeneration, wantedGeneration, hostName, serverTimeout, trace, vespaVersion, 3, compressionType, "config.v3.getConfig") + : SlimeConfigRequest(connection, key, configMd5, currentGeneration, hostName, serverTimeout, trace, vespaVersion, 3, compressionType, "config.v3.getConfig") { } diff --git a/config/src/vespa/config/frt/frtconfigrequestv3.h b/config/src/vespa/config/frt/frtconfigrequestv3.h index d8c767bc936..3b671e52c08 100644 --- a/config/src/vespa/config/frt/frtconfigrequestv3.h +++ b/config/src/vespa/config/frt/frtconfigrequestv3.h @@ -19,7 +19,6 @@ public: const ConfigKey & key, const vespalib::string & configMd5, int64_t currentGeneration, - int64_t wantedGeneration, const vespalib::string & hostName, int64_t serverTimeout, const Trace & trace, diff --git a/config/src/vespa/config/frt/protocol.cpp b/config/src/vespa/config/frt/protocol.cpp index 9f8ea9a06fa..4ad55726863 100644 --- a/config/src/vespa/config/frt/protocol.cpp +++ b/config/src/vespa/config/frt/protocol.cpp @@ -25,7 +25,6 @@ const Memory REQUEST_CLIENT_CONFIGID = "configId"; const Memory REQUEST_CLIENT_HOSTNAME = "clientHostname"; const Memory REQUEST_CONFIG_MD5 = "configMD5"; const Memory REQUEST_CURRENT_GENERATION = "currentGeneration"; -const Memory REQUEST_WANTED_GENERATION = "wantedGeneration"; const Memory REQUEST_TIMEOUT = "timeout"; const Memory REQUEST_TRACE = "trace"; const Memory REQUEST_VESPA_VERSION = "vespaVersion"; diff --git a/config/src/vespa/config/frt/protocol.h b/config/src/vespa/config/frt/protocol.h index 2c96d355a1d..176f2c34026 100644 --- a/config/src/vespa/config/frt/protocol.h +++ b/config/src/vespa/config/frt/protocol.h @@ -38,7 +38,6 @@ extern const vespalib::Memory REQUEST_CLIENT_CONFIGID; extern const vespalib::Memory REQUEST_CLIENT_HOSTNAME; extern const vespalib::Memory REQUEST_CONFIG_MD5; extern const vespalib::Memory REQUEST_CURRENT_GENERATION; -extern const vespalib::Memory REQUEST_WANTED_GENERATION; extern const vespalib::Memory REQUEST_TIMEOUT; extern const vespalib::Memory REQUEST_TRACE; extern const vespalib::Memory REQUEST_VESPA_VERSION; diff --git a/config/src/vespa/config/frt/slimeconfigrequest.cpp b/config/src/vespa/config/frt/slimeconfigrequest.cpp index 27ac39ae56a..07626c1e274 100644 --- a/config/src/vespa/config/frt/slimeconfigrequest.cpp +++ b/config/src/vespa/config/frt/slimeconfigrequest.cpp @@ -23,7 +23,6 @@ SlimeConfigRequest::SlimeConfigRequest(Connection * connection, const ConfigKey & key, const vespalib::string & configMd5, int64_t currentGeneration, - int64_t wantedGeneration, const vespalib::string & hostName, int64_t serverTimeout, const Trace & trace, @@ -34,7 +33,7 @@ SlimeConfigRequest::SlimeConfigRequest(Connection * connection, : FRTConfigRequest(connection, key), _data() { - populateSlimeRequest(key, configMd5, currentGeneration, wantedGeneration, hostName, serverTimeout, trace, vespaVersion, protocolVersion, compressionType); + populateSlimeRequest(key, configMd5, currentGeneration, hostName, serverTimeout, trace, vespaVersion, protocolVersion, compressionType); _request->SetMethodName(methodName.c_str()); _parameters.AddString(createJsonFromSlime(_data).c_str()); } @@ -50,7 +49,6 @@ void SlimeConfigRequest::populateSlimeRequest(const ConfigKey & key, const vespalib::string & configMd5, int64_t currentGeneration, - int64_t wantedGeneration, const vespalib::string & hostName, int64_t serverTimeout, const Trace & trace, @@ -69,7 +67,6 @@ SlimeConfigRequest::populateSlimeRequest(const ConfigKey & key, root.setString(REQUEST_CLIENT_HOSTNAME, Memory(hostName)); root.setString(REQUEST_CONFIG_MD5, Memory(configMd5)); root.setLong(REQUEST_CURRENT_GENERATION, currentGeneration); - root.setLong(REQUEST_WANTED_GENERATION, wantedGeneration); root.setLong(REQUEST_TIMEOUT, serverTimeout); trace.serialize(root.setObject(REQUEST_TRACE)); root.setString(REQUEST_COMPRESSION_TYPE, Memory(compressionTypeToString(compressionType))); diff --git a/config/src/vespa/config/frt/slimeconfigrequest.h b/config/src/vespa/config/frt/slimeconfigrequest.h index 625d70c094b..60c44b6c97f 100644 --- a/config/src/vespa/config/frt/slimeconfigrequest.h +++ b/config/src/vespa/config/frt/slimeconfigrequest.h @@ -21,7 +21,6 @@ public: const ConfigKey & key, const vespalib::string & configMd5, int64_t currentGeneration, - int64_t wantedGeneration, const vespalib::string & hostName, int64_t serverTimeout, const Trace & trace, @@ -36,7 +35,6 @@ private: void populateSlimeRequest(const ConfigKey & key, const vespalib::string & configMd5, int64_t currentGeneration, - int64_t wantedGeneration, const vespalib::string & hostName, int64_t serverTimeout, const Trace & trace, |