diff --git a/CHANGELOG b/CHANGELOG index 3f3d24c881a5..3dcce87f0bd4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,13 @@ devel ----- +* Fix cluster-internal network protocol to HTTP/1 for now. Any other protocol + selected via the startup option `--network.protocol` will automatically be + switched to HTTP/1. The startup option `--network.protocol` is now deprecated + and hidden by default. It will be removed in a future version of arangod. + The rationale for this change is to move towards a single protocol for + cluster-internal communication instead of 3 different ones. + * Disable RTTI when compiling Snappy. RTTI used to be disabled previously, up until some Merkle tree improvement PR was merged about one month ago, which turned on RTTI for compiling Snappy. diff --git a/arangod/Network/NetworkFeature.cpp b/arangod/Network/NetworkFeature.cpp index d152a6c060e9..40c0b52cc5ba 100644 --- a/arangod/Network/NetworkFeature.cpp +++ b/arangod/Network/NetworkFeature.cpp @@ -133,9 +133,12 @@ void NetworkFeature::collectOptions(std::shared_ptr opt std::unordered_set protos = { "", "http", "http2", "h2", "vst"}; + // starting with 3.9, we will hard-code the protocol for cluster-internal communication options->addOption("--network.protocol", "network protocol to use for cluster-internal communication", - new DiscreteValuesParameter(&_protocol, protos)) - .setIntroducedIn(30700); + new DiscreteValuesParameter(&_protocol, protos), + options::makeDefaultFlags(options::Flags::Hidden)) + .setIntroducedIn(30700) + .setDeprecatedIn(30900); options ->addOption("--network.max-requests-in-flight", @@ -182,6 +185,11 @@ void NetworkFeature::prepare() { config.clusterInfo = ci; config.name = "ClusterComm"; + // using an internal network protocol other than HTTP/1 is + // not supported since 3.9. the protocol is always hard-coded + // to HTTP/1 from now on. + // note: we plan to upgrade the internal protocol to HTTP/2 at + // some point in the future config.protocol = fuerte::ProtocolType::Http; if (_protocol == "http" || _protocol == "h1") { config.protocol = fuerte::ProtocolType::Http; @@ -191,6 +199,13 @@ void NetworkFeature::prepare() { config.protocol = fuerte::ProtocolType::Vst; } + if (config.protocol != fuerte::ProtocolType::Http) { + LOG_TOPIC("6d221", WARN, Logger::CONFIG) + << "using `--network.protocol` is deprecated. " + << "the network protocol for cluster-internal requests is hard-coded to HTTP/1 in this version"; + config.protocol = fuerte::ProtocolType::Http; + } + _pool = std::make_unique(config); _poolPtr.store(_pool.get(), std::memory_order_relaxed);