Skip to content

Commit

Permalink
Add comment about binary protocol fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngo The Trung authored and Ngo-The-Trung committed Aug 27, 2018
1 parent f7b6323 commit 626d816
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mcrouter/lib/network/McBinaryParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ void McServerBinaryParser::consumeArithLike() {
auto& message = currentMessage_.get<Request>();
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;
Expand All @@ -298,6 +300,7 @@ template <bool quiet>
void McServerBinaryParser::consumeFlush() {
// auto extras = reinterpret_cast<const FlushExtras_t*>(currentExtras_.data());
auto& message = currentMessage_.get<McFlushAllRequest>();
// Binary protocol only fields
// message.exptime() = ntohl(extras->exptime);
message.quiet() = quiet;
callback_->onRequest(std::move(message));
Expand Down

0 comments on commit 626d816

Please sign in to comment.