From e0d624c167afe120049eb1f9c6cbd121f54d7c65 Mon Sep 17 00:00:00 2001 From: Xiaoxi Wang Date: Mon, 28 Feb 2022 10:39:29 -0800 Subject: [PATCH] format --- fdbclient/SpecialKeySpace.actor.cpp | 24 ++++++++++++------------ fdbclient/SystemData.cpp | 2 +- fdbclient/SystemData.h | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/fdbclient/SpecialKeySpace.actor.cpp b/fdbclient/SpecialKeySpace.actor.cpp index bf6d67fc79..8ee66b7df7 100644 --- a/fdbclient/SpecialKeySpace.actor.cpp +++ b/fdbclient/SpecialKeySpace.actor.cpp @@ -2444,21 +2444,21 @@ Future> DataDistributionImpl::commit(ReadYourWritesTransac try { boost::lexical_cast(iter->value().second.get().toString()); } catch (boost::bad_lexical_cast& e) { - ManagementAPIError::toJsonString(false, - "datadistribution", - "Invalid datadistribution rebalance ignore option (int or empty): " + - iter->value().second.get().toString()); + ManagementAPIError::toJsonString( + false, + "datadistribution", + "Invalid datadistribution rebalance ignore option (int or empty): " + + iter->value().second.get().toString()); val = ""_sr; } ryw->getTransaction().set(rebalanceDDIgnoreKey, iter->value().second.get()); -// if (iter->value().second.get().size()) -// msg = -// ManagementAPIError::toJsonString(false, -// "datadistribution", -// "Value is unused for the data_distribution/rebalance_ignored " -// "key, please set it to an empty value"); -// else -// ryw->getTransaction().set(rebalanceDDIgnoreKey, LiteralStringRef("on")); + // if (iter->value().second.get().size()) + // msg = + // ManagementAPIError::toJsonString(false, + // "datadistribution", + // "Value is unused for the + //data_distribution/rebalance_ignored " "key, please set it to an empty value"); else + // ryw->getTransaction().set(rebalanceDDIgnoreKey, LiteralStringRef("on")); } else { msg = ManagementAPIError::toJsonString( false, diff --git a/fdbclient/SystemData.cpp b/fdbclient/SystemData.cpp index af856028aa..96b993f83d 100644 --- a/fdbclient/SystemData.cpp +++ b/fdbclient/SystemData.cpp @@ -309,7 +309,7 @@ std::pair serverKeysDecodeServerBegin(const KeyRef& key) { rd >> server_id; rd.readBytes(1); // skip "/" std::string bytes; - while(!rd.empty()) { + while (!rd.empty()) { bytes.push_back((char)*rd.arenaRead(1)); } // std::cout << bytes.size() << " " < serverKeysDecodeServerBegin(const KeyRef& key) ; +std::pair serverKeysDecodeServerBegin(const KeyRef& key); bool serverHasKey(ValueRef storedValue); extern const KeyRangeRef conflictingKeysRange; @@ -486,7 +486,7 @@ extern const KeyRangeRef monitorConfKeys; extern const KeyRef healthyZoneKey; extern const StringRef ignoreSSFailuresZoneString; extern const KeyRef rebalanceDDIgnoreKey; -enum DDIgnore {REBALANCE_DISK = 1, REBALANCE_READ = 2}; +enum DDIgnore { REBALANCE_DISK = 1, REBALANCE_READ = 2 }; const Value healthyZoneValue(StringRef const& zoneId, Version version); std::pair decodeHealthyZoneValue(ValueRef const&);