From 113ac12b03764e36a52427aaad5c3154770184b2 Mon Sep 17 00:00:00 2001 From: Ngo The Trung Date: Sun, 27 Aug 2017 06:54:51 +0000 Subject: [PATCH] Undo changes to make quiet and returnKey available Likely better to add new Reply classes to handle this --- mcrouter/lib/carbon/RequestCommon.h | 7 ++++--- mcrouter/lib/network/McBinaryParser.cpp | 14 +++++++------- mcrouter/lib/network/WriteBuffer-inl.h | 2 +- mcrouter/lib/network/gen/MemcacheMessages.h | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/mcrouter/lib/carbon/RequestCommon.h b/mcrouter/lib/carbon/RequestCommon.h index db855c241..8a7357f7d 100644 --- a/mcrouter/lib/carbon/RequestCommon.h +++ b/mcrouter/lib/carbon/RequestCommon.h @@ -89,6 +89,7 @@ class RequestCommon { fbtraceInfo_ = McFbtraceRef::moveRef(carbonFbtraceInfo); } #endif + /* bool quiet() const { return quiet_; } @@ -100,7 +101,7 @@ class RequestCommon { } bool& returnKey() { return returnKey_; - } + }*/ /** * Tells whether or not "serializedBuffer()" is dirty, in which case it can't @@ -142,8 +143,8 @@ class RequestCommon { private: static constexpr size_t kTraceIdSize = 11; - bool quiet_{false}; - bool returnKey_{false}; + // bool quiet_{false}; + // bool returnKey_{false}; }; diff --git a/mcrouter/lib/network/McBinaryParser.cpp b/mcrouter/lib/network/McBinaryParser.cpp index 2644a3b51..a53804ba1 100644 --- a/mcrouter/lib/network/McBinaryParser.cpp +++ b/mcrouter/lib/network/McBinaryParser.cpp @@ -242,7 +242,7 @@ void McServerBinaryParser::consumeSetLike() { auto& message = currentMessage_.get(); message.key() = std::move(currentKey_); message.exptime() = ntohl(extras->exptime); - message.quiet() = quiet; + // message.quiet() = quiet; callback_->onRequest(std::move(message)); } @@ -251,7 +251,7 @@ void McServerBinaryParser::consumeAppendLike() { auto& message = currentMessage_.get(); message.key() = std::move(currentKey_); message.value() = std::move(currentValue_); - message.quiet() = quiet; + // message.quiet() = quiet; callback_->onRequest(std::move(message)); } @@ -259,8 +259,8 @@ template void McServerBinaryParser::consumeGetLike() { auto& message = currentMessage_.get(); message.key() = std::move(currentKey_); - message.quiet() = quiet; - message.returnKey() = returnKey; + // message.quiet() = quiet; + // message.returnKey() = returnKey; callback_->onRequest(std::move(message)); } @@ -274,14 +274,14 @@ void McServerBinaryParser::consumeArithLike() { // upstream servers because we use the ASCII protocol for upstreams // message.initialValue() = ntohl(extras->initialValue); // message.exptime() = ntohl(extras->exptime); - message.quiet() = quiet; + // message.quiet() = quiet; callback_->onRequest(std::move(message)); } template void McServerBinaryParser::consumeQuit() { auto& message = currentMessage_.get(); - message.quiet() = quiet; + // message.quiet() = quiet; callback_->onRequest(std::move(message)); } @@ -296,7 +296,7 @@ void McServerBinaryParser::consumeFlush() { auto& message = currentMessage_.get(); // Binary protocol only fields // message.exptime() = ntohl(extras->exptime); - message.quiet() = quiet; + // message.quiet() = quiet; callback_->onRequest(std::move(message)); } diff --git a/mcrouter/lib/network/WriteBuffer-inl.h b/mcrouter/lib/network/WriteBuffer-inl.h index 5dca6c37e..bbc026fca 100644 --- a/mcrouter/lib/network/WriteBuffer-inl.h +++ b/mcrouter/lib/network/WriteBuffer-inl.h @@ -37,7 +37,7 @@ WriteBuffer::prepareTyped( typeId_ = static_cast(Reply::typeId); // The current congestion control only supports mc_caret_protocol. - // May extend to other protocals in the future. + // May extend to other protocols in the future. switch (protocol_) { case mc_ascii_protocol: return asciiReply_.prepare( diff --git a/mcrouter/lib/network/gen/MemcacheMessages.h b/mcrouter/lib/network/gen/MemcacheMessages.h index b0cdcacfc..e47a877a4 100644 --- a/mcrouter/lib/network/gen/MemcacheMessages.h +++ b/mcrouter/lib/network/gen/MemcacheMessages.h @@ -149,7 +149,7 @@ class McGetReply : public carbon::ReplyCommon { private: folly::Optional value_; - uint64_t flags_{0}; + uint64_t flags_{0}; // FIXME Shouldn't this be 32 bits? std::string message_; carbon::Result result_{mc_res_unknown}; int16_t appSpecificErrorCode_{0};