Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
olapiv committed Nov 13, 2024
1 parent 0aa9c35 commit 2354588
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 26 deletions.
18 changes: 0 additions & 18 deletions pink/rondis/cmd_builder/client_conn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ std::shared_ptr<Cmd> PikaClientConn::DoCmd(const pink::RedisCmdArgsType& argv, c
return c_ptr;
}

int8_t subCmdIndex = -1;
std::string errKey;
std::string cmdName = c_ptr->name();

if (IsInTxn() && opt != kCmdNameExec && opt != kCmdNameWatch && opt != kCmdNameDiscard && opt != kCmdNameMulti) {
PushCmdToQue(c_ptr);
c_ptr->res().SetRes(CmdRes::kTxnQueued);
return c_ptr;
}

// Process Command
c_ptr->Execute();

Expand All @@ -66,14 +56,6 @@ void PikaClientConn::PushCmdToQue(std::shared_ptr<Cmd> cmd) { txn_cmd_que_.push(

void PikaClientConn::ClearTxnCmdQue() { txn_cmd_que_ = std::queue<std::shared_ptr<Cmd>>{}; }

void PikaClientConn::ExitTxn() {
if (IsInTxn()) {
ClearTxnCmdQue();
std::lock_guard<std::mutex> lg(txn_state_mu_);
txn_state_.reset();
}
}

void PikaClientConn::ExecRedisCmd(const pink::RedisCmdArgsType& argv, std::shared_ptr<std::string>& resp_ptr,
bool cache_miss_in_rtc) {
// get opt
Expand Down
1 change: 0 additions & 1 deletion pink/rondis/cmd_builder/client_conn.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class PikaClientConn : public pink::RedisConn {
std::queue<std::shared_ptr<Cmd>> GetTxnCmdQue();
void PushCmdToQue(std::shared_ptr<Cmd> cmd);
void ClearTxnCmdQue();
void ExitTxn();

pink::ServerThread* server_thread() { return server_thread_; }

Expand Down
5 changes: 0 additions & 5 deletions pink/rondis/cmd_builder/cmd_table_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,4 @@ CmdTable* PikaCmdTableManager::GetCmdTable() { return cmds_.get(); }

uint32_t PikaCmdTableManager::GetMaxCmdId() { return cmdId_; }

void PikaCmdTableManager::InsertCurrentThreadDistributionMap() {
auto tid = std::this_thread::get_id();
std::lock_guard l(map_protector_);
}

bool PikaCmdTableManager::CmdExist(const std::string& cmd) const { return cmds_->find(cmd) != cmds_->end(); }
2 changes: 0 additions & 2 deletions pink/rondis/cmd_builder/cmd_table_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class PikaCmdTableManager {
private:
std::shared_ptr<Cmd> NewCommand(const std::string& opt);

void InsertCurrentThreadDistributionMap();

std::unique_ptr<CmdTable> cmds_;

uint32_t cmdId_ = 0;
Expand Down

0 comments on commit 2354588

Please sign in to comment.