Skip to content

Commit 113ac12

Browse files
Ngo The TrungNgo-The-Trung
authored andcommitted
Undo changes to make quiet and returnKey available
Likely better to add new Reply classes to handle this
1 parent c73e012 commit 113ac12

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

mcrouter/lib/carbon/RequestCommon.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class RequestCommon {
8989
fbtraceInfo_ = McFbtraceRef::moveRef(carbonFbtraceInfo);
9090
}
9191
#endif
92+
/*
9293
bool quiet() const {
9394
return quiet_;
9495
}
@@ -100,7 +101,7 @@ class RequestCommon {
100101
}
101102
bool& returnKey() {
102103
return returnKey_;
103-
}
104+
}*/
104105

105106
/**
106107
* Tells whether or not "serializedBuffer()" is dirty, in which case it can't
@@ -142,8 +143,8 @@ class RequestCommon {
142143

143144
private:
144145
static constexpr size_t kTraceIdSize = 11;
145-
bool quiet_{false};
146-
bool returnKey_{false};
146+
// bool quiet_{false};
147+
// bool returnKey_{false};
147148
};
148149

149150

mcrouter/lib/network/McBinaryParser.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void McServerBinaryParser::consumeSetLike() {
242242
auto& message = currentMessage_.get<Request>();
243243
message.key() = std::move(currentKey_);
244244
message.exptime() = ntohl(extras->exptime);
245-
message.quiet() = quiet;
245+
// message.quiet() = quiet;
246246
callback_->onRequest(std::move(message));
247247
}
248248

@@ -251,16 +251,16 @@ void McServerBinaryParser::consumeAppendLike() {
251251
auto& message = currentMessage_.get<Request>();
252252
message.key() = std::move(currentKey_);
253253
message.value() = std::move(currentValue_);
254-
message.quiet() = quiet;
254+
// message.quiet() = quiet;
255255
callback_->onRequest(std::move(message));
256256
}
257257

258258
template <class Request, bool quiet, bool returnKey>
259259
void McServerBinaryParser::consumeGetLike() {
260260
auto& message = currentMessage_.get<Request>();
261261
message.key() = std::move(currentKey_);
262-
message.quiet() = quiet;
263-
message.returnKey() = returnKey;
262+
// message.quiet() = quiet;
263+
// message.returnKey() = returnKey;
264264
callback_->onRequest(std::move(message));
265265
}
266266

@@ -274,14 +274,14 @@ void McServerBinaryParser::consumeArithLike() {
274274
// upstream servers because we use the ASCII protocol for upstreams
275275
// message.initialValue() = ntohl(extras->initialValue);
276276
// message.exptime() = ntohl(extras->exptime);
277-
message.quiet() = quiet;
277+
// message.quiet() = quiet;
278278
callback_->onRequest(std::move(message));
279279
}
280280

281281
template <bool quiet>
282282
void McServerBinaryParser::consumeQuit() {
283283
auto& message = currentMessage_.get<McQuitRequest>();
284-
message.quiet() = quiet;
284+
// message.quiet() = quiet;
285285
callback_->onRequest(std::move(message));
286286
}
287287

@@ -296,7 +296,7 @@ void McServerBinaryParser::consumeFlush() {
296296
auto& message = currentMessage_.get<McFlushAllRequest>();
297297
// Binary protocol only fields
298298
// message.exptime() = ntohl(extras->exptime);
299-
message.quiet() = quiet;
299+
// message.quiet() = quiet;
300300
callback_->onRequest(std::move(message));
301301
}
302302

mcrouter/lib/network/WriteBuffer-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ WriteBuffer::prepareTyped(
3737
typeId_ = static_cast<uint32_t>(Reply::typeId);
3838

3939
// The current congestion control only supports mc_caret_protocol.
40-
// May extend to other protocals in the future.
40+
// May extend to other protocols in the future.
4141
switch (protocol_) {
4242
case mc_ascii_protocol:
4343
return asciiReply_.prepare(

mcrouter/lib/network/gen/MemcacheMessages.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class McGetReply : public carbon::ReplyCommon {
149149

150150
private:
151151
folly::Optional<folly::IOBuf> value_;
152-
uint64_t flags_{0};
152+
uint64_t flags_{0}; // FIXME Shouldn't this be 32 bits?
153153
std::string message_;
154154
carbon::Result result_{mc_res_unknown};
155155
int16_t appSpecificErrorCode_{0};

0 commit comments

Comments
 (0)