Skip to content

Commit 2354588

Browse files
committed
Removed unused code
1 parent 0aa9c35 commit 2354588

File tree

4 files changed

+0
-26
lines changed

4 files changed

+0
-26
lines changed

pink/rondis/cmd_builder/client_conn.cc

-18
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ std::shared_ptr<Cmd> PikaClientConn::DoCmd(const pink::RedisCmdArgsType& argv, c
3131
return c_ptr;
3232
}
3333

34-
int8_t subCmdIndex = -1;
35-
std::string errKey;
36-
std::string cmdName = c_ptr->name();
37-
38-
if (IsInTxn() && opt != kCmdNameExec && opt != kCmdNameWatch && opt != kCmdNameDiscard && opt != kCmdNameMulti) {
39-
PushCmdToQue(c_ptr);
40-
c_ptr->res().SetRes(CmdRes::kTxnQueued);
41-
return c_ptr;
42-
}
43-
4434
// Process Command
4535
c_ptr->Execute();
4636

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

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

69-
void PikaClientConn::ExitTxn() {
70-
if (IsInTxn()) {
71-
ClearTxnCmdQue();
72-
std::lock_guard<std::mutex> lg(txn_state_mu_);
73-
txn_state_.reset();
74-
}
75-
}
76-
7759
void PikaClientConn::ExecRedisCmd(const pink::RedisCmdArgsType& argv, std::shared_ptr<std::string>& resp_ptr,
7860
bool cache_miss_in_rtc) {
7961
// get opt

pink/rondis/cmd_builder/client_conn.h

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class PikaClientConn : public pink::RedisConn {
2727
std::queue<std::shared_ptr<Cmd>> GetTxnCmdQue();
2828
void PushCmdToQue(std::shared_ptr<Cmd> cmd);
2929
void ClearTxnCmdQue();
30-
void ExitTxn();
3130

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

pink/rondis/cmd_builder/cmd_table_manager.cc

-5
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,4 @@ CmdTable* PikaCmdTableManager::GetCmdTable() { return cmds_.get(); }
3535

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

38-
void PikaCmdTableManager::InsertCurrentThreadDistributionMap() {
39-
auto tid = std::this_thread::get_id();
40-
std::lock_guard l(map_protector_);
41-
}
42-
4338
bool PikaCmdTableManager::CmdExist(const std::string& cmd) const { return cmds_->find(cmd) != cmds_->end(); }

pink/rondis/cmd_builder/cmd_table_manager.h

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class PikaCmdTableManager {
2525
private:
2626
std::shared_ptr<Cmd> NewCommand(const std::string& opt);
2727

28-
void InsertCurrentThreadDistributionMap();
29-
3028
std::unique_ptr<CmdTable> cmds_;
3129

3230
uint32_t cmdId_ = 0;

0 commit comments

Comments
 (0)