From c98603cbf401fa1aec74ba0da04eddbadcba3276 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 1 Oct 2021 12:21:07 +0200 Subject: [PATCH 1/2] willi --- CHANGELOG | 3 +++ arangosh/Shell/ClientFeature.cpp | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d1cecf332792..47d93db94414 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ devel ----- +* Retain backwards-compatibility for client tools when more than one + endpoint is specified but the tool only supports a single endpoint. + * Fixed BTS-602 by not starting license feature is upgrade mode. * APM-173: Now, arangobench, arangodump and arangorestore support multiple diff --git a/arangosh/Shell/ClientFeature.cpp b/arangosh/Shell/ClientFeature.cpp index e766cf8185cc..c9c5801a506b 100644 --- a/arangosh/Shell/ClientFeature.cpp +++ b/arangosh/Shell/ClientFeature.cpp @@ -203,9 +203,15 @@ void ClientFeature::validateOptions(std::shared_ptr options) { } if (_endpoints.size() > _maxNumEndpoints) { - LOG_TOPIC("6e305", FATAL, arangodb::Logger::FIXME) - << "Maximum number of endpoints exceeded"; - FATAL_ERROR_EXIT(); + // this is the case if we have more endpoints than allowed. + // in versions before 3.9, it was allowed to specify `--server.endpoint` + // multiple times, and if this was done, only the last provided endpoint + // was used. to keep backward-compatibility, we now emulate this + // behavior here. + TRI_ASSERT(_maxNumEndpoints == 1); + std::string selectedEndpoint = _endpoints.back(); + + _endpoints = { std::move(selectedEndpoint) }; } // if a username is specified explicitly, assume authentication is desired From 71d905989811cb1b3f27a387fe69aec3ca844ff3 Mon Sep 17 00:00:00 2001 From: Vadim Date: Fri, 1 Oct 2021 14:50:16 +0300 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 47d93db94414..d1cecf332792 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,6 @@ devel ----- -* Retain backwards-compatibility for client tools when more than one - endpoint is specified but the tool only supports a single endpoint. - * Fixed BTS-602 by not starting license feature is upgrade mode. * APM-173: Now, arangobench, arangodump and arangorestore support multiple