diff options
Diffstat (limited to 'vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java')
-rw-r--r-- | vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java index e9852de215a..57007743b1b 100644 --- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java +++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java @@ -78,7 +78,7 @@ class ApacheGatewayConnection implements GatewayConnection { ConnectionParams connectionParams, HttpClientFactory httpClientFactory, String clientId) { - SUPPORTED_VERSIONS.add(2); + SUPPORTED_VERSIONS.add(3); this.endpoint = endpoint; this.feedParams = feedParams; this.clusterSpecificRoute = clusterSpecificRoute; @@ -94,11 +94,8 @@ class ApacheGatewayConnection implements GatewayConnection { endOfFeed = END_OF_FEED_XML; } this.clientId = clientId; - if (connectionParams.isEnableV3Protocol()) { - if (this.clientId == null) { - throw new RuntimeException("Set to support version 3, but got no client Id."); - } - SUPPORTED_VERSIONS.add(3); + if (this.clientId == null) { + throw new RuntimeException("Got no client Id."); } } @@ -161,7 +158,7 @@ class ApacheGatewayConnection implements GatewayConnection { private ByteBuffer[] getDataWithStartAndEndOfFeed(List<Document> docs, int version) { List<ByteBuffer> data = new ArrayList<>(); - if (version == 2 || version == 3) { // TODO: Vespa 7: Remove support for version 2 + if (version == 3) { for (Document doc : docs) { int operationSize = doc.size() + startOfFeed.length + endOfFeed.length; StringBuilder envelope = new StringBuilder(); @@ -344,10 +341,6 @@ class ApacheGatewayConnection implements GatewayConnection { log.log(Level.FINE, "Server decided upon protocol version " + serverVersion + "."); } } - if (this.connectionParams.isEnableV3Protocol() && serverVersion != 3) { - throw new ServerResponseException("Client was set up to use v3 of protocol, however, gateway wants to " + - "use version " + serverVersion + ". Already set up structures for v3 so can not do v2 now."); - } this.negotiatedVersion = serverVersion; } |