Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/brpc/redis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ bool RedisRequest::AddCommand(const butil::StringPiece& command) {
CHECK(st.ok()) << st;
_has_error = true;
return false;
}
}
}

bool RedisRequest::AddCommandByComponents(const butil::StringPiece* components,
bool RedisRequest::AddCommandByComponents(const butil::StringPiece* components,
size_t n) {
if (_has_error) {
return false;
Expand All @@ -117,7 +117,7 @@ bool RedisRequest::AddCommandByComponents(const butil::StringPiece* components,
CHECK(st.ok()) << st;
_has_error = true;
return false;
}
}
}

bool RedisRequest::AddCommandWithArgs(const char* fmt, ...) {
Expand Down Expand Up @@ -356,7 +356,7 @@ bool RedisService::AddCommandHandler(const std::string& name, RedisCommandHandle
_command_map[lcname] = handler;
return true;
}

RedisCommandHandler* RedisService::FindCommandHandler(const butil::StringPiece& name) const {
auto it = _command_map.find(name.as_string());
if (it != _command_map.end()) {
Expand All @@ -371,6 +371,11 @@ RedisCommandHandler* RedisCommandHandler::NewTransactionHandler() {
}

// ========== impl of RedisConnContext ==========
RedisConnContext::RedisConnContext(const RedisService* rs)
: redis_service(rs)
, batched_size(0)
, session(nullptr) {}

RedisConnContext::~RedisConnContext() { }

void RedisConnContext::Destroy() {
Expand Down
5 changes: 1 addition & 4 deletions src/brpc/redis.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,7 @@ class RedisCommandParser;
// This class is as parsing_context in socket.
class RedisConnContext : public Destroyable {
public:
explicit RedisConnContext(const RedisService* rs)
: redis_service(rs)
, batched_size(0)
, session(nullptr) {}
explicit RedisConnContext(const RedisService* rs);

~RedisConnContext();
// @Destroyable
Expand Down
Loading