From 626d8164722c523993aa8ec1a07cffdf3c6eebf7 Mon Sep 17 00:00:00 2001 From: Ngo The Trung Date: Sun, 27 Aug 2017 04:22:54 +0000 Subject: [PATCH] Add comment about binary protocol fields --- mcrouter/lib/network/McBinaryParser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mcrouter/lib/network/McBinaryParser.cpp b/mcrouter/lib/network/McBinaryParser.cpp index 1605c99d8..658876db1 100644 --- a/mcrouter/lib/network/McBinaryParser.cpp +++ b/mcrouter/lib/network/McBinaryParser.cpp @@ -276,6 +276,8 @@ void McServerBinaryParser::consumeArithLike() { auto& message = currentMessage_.get(); message.key() = std::move(currentKey_); message.delta() = ntohl(extras->delta); + // These fields are for binary protocol only, we cannot forward them to + // upstream servers because we use the ASCII protocol for upstreams // message.initialValue() = ntohl(extras->initialValue); // message.exptime() = ntohl(extras->exptime); message.quiet() = quiet; @@ -298,6 +300,7 @@ template void McServerBinaryParser::consumeFlush() { // auto extras = reinterpret_cast(currentExtras_.data()); auto& message = currentMessage_.get(); + // Binary protocol only fields // message.exptime() = ntohl(extras->exptime); message.quiet() = quiet; callback_->onRequest(std::move(message));