From 07a3051f0e04b167c1e362012f4fa16a2d1141ca Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 3 Feb 2020 09:52:32 -0800 Subject: [PATCH 1/4] Enable include_port_in_address by default for api version 700 Resolves #2607 --- documentation/sphinx/source/api-common.rst.inc | 4 ++-- fdbclient/NativeAPI.actor.cpp | 4 ++-- fdbclient/NativeAPI.actor.h | 1 - fdbclient/vexillographer/fdb.options | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/documentation/sphinx/source/api-common.rst.inc b/documentation/sphinx/source/api-common.rst.inc index 65a5885c30..cd2dacf478 100644 --- a/documentation/sphinx/source/api-common.rst.inc +++ b/documentation/sphinx/source/api-common.rst.inc @@ -331,7 +331,7 @@ .. |option-db-include-port-in-address-blurb| replace:: - Addresses returned by get_addresses_for_key include the port when enabled. This will be enabled by default in api version 700, and this option will be deprecated. Enabling this option is equivalent to calling |include-port-in-address-transaction-option| on each transaction created by this database. + Addresses returned by get_addresses_for_key include the port when enabled. This option is now enabled by default and setting this has no effect. .. |option-db-snapshot-ryw-enable-blurb| replace:: @@ -374,7 +374,7 @@ .. |option-include-port-in-address-blurb| replace:: - Addresses returned by get_addresses_for_key include the port when enabled. This will be enabled by default in api version 700, and this option will be deprecated. One can set this for all transactions by calling |include-port-in-address-database-option|. + Addresses returned by get_addresses_for_key include the port when enabled. This option is now enabled by default and setting this has no effect. .. |option-causal-write-risky-blurb| replace:: diff --git a/fdbclient/NativeAPI.actor.cpp b/fdbclient/NativeAPI.actor.cpp index c17bb53149..80304174f6 100644 --- a/fdbclient/NativeAPI.actor.cpp +++ b/fdbclient/NativeAPI.actor.cpp @@ -2175,7 +2175,7 @@ ACTOR Future>> getAddressesForKeyActor(Key key Standalone> addresses; for (auto i : ssi) { - std::string ipString = options.includePort ? i.address().toString() : i.address().ip.toString(); + std::string ipString = i.address().toString(); char* c_string = new (addresses.arena()) char[ipString.length()+1]; strcpy(c_string, ipString.c_str()); addresses.push_back(addresses.arena(), c_string); @@ -2987,7 +2987,7 @@ void Transaction::setOption( FDBTransactionOptions::Option option, Optional