diff --git a/fdbclient/DatabaseConfiguration.cpp b/fdbclient/DatabaseConfiguration.cpp index dd4872e5110..016417429cb 100644 --- a/fdbclient/DatabaseConfiguration.cpp +++ b/fdbclient/DatabaseConfiguration.cpp @@ -402,7 +402,9 @@ std::string DatabaseConfiguration::configureStringFromJSON(const StatusObject& j continue; } - result += " "; + if (!result.empty()) { + result += " "; + } // All integers are assumed to be actual DatabaseConfig keys and are set with // the hidden ":=" syntax of the configure command. if (kv.second.type() == json_spirit::int_type) { @@ -444,7 +446,10 @@ std::string DatabaseConfiguration::configureStringFromJSON(const StatusObject& j // explicit log_engine we simply add " log_engine=ssd-2" to the output string if the input JSON did not contain a // log_engine. if (!json.contains("log_engine")) { - result += " log_engine=ssd-2"; + if (!result.empty()) { + result += " "; + } + result += "log_engine=ssd-2"; } return result;