diff --git a/pink/rondis/cmd_builder/client_conn.cc b/pink/rondis/cmd_builder/client_conn.cc index 6f16f31e..1c05b1e7 100644 --- a/pink/rondis/cmd_builder/client_conn.cc +++ b/pink/rondis/cmd_builder/client_conn.cc @@ -31,16 +31,6 @@ std::shared_ptr 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(); @@ -66,14 +56,6 @@ void PikaClientConn::PushCmdToQue(std::shared_ptr cmd) { txn_cmd_que_.push( void PikaClientConn::ClearTxnCmdQue() { txn_cmd_que_ = std::queue>{}; } -void PikaClientConn::ExitTxn() { - if (IsInTxn()) { - ClearTxnCmdQue(); - std::lock_guard lg(txn_state_mu_); - txn_state_.reset(); - } -} - void PikaClientConn::ExecRedisCmd(const pink::RedisCmdArgsType& argv, std::shared_ptr& resp_ptr, bool cache_miss_in_rtc) { // get opt diff --git a/pink/rondis/cmd_builder/client_conn.h b/pink/rondis/cmd_builder/client_conn.h index 5aa5e122..5f059118 100644 --- a/pink/rondis/cmd_builder/client_conn.h +++ b/pink/rondis/cmd_builder/client_conn.h @@ -27,7 +27,6 @@ class PikaClientConn : public pink::RedisConn { std::queue> GetTxnCmdQue(); void PushCmdToQue(std::shared_ptr cmd); void ClearTxnCmdQue(); - void ExitTxn(); pink::ServerThread* server_thread() { return server_thread_; } diff --git a/pink/rondis/cmd_builder/cmd_table_manager.cc b/pink/rondis/cmd_builder/cmd_table_manager.cc index 47dda41f..852b1e1a 100644 --- a/pink/rondis/cmd_builder/cmd_table_manager.cc +++ b/pink/rondis/cmd_builder/cmd_table_manager.cc @@ -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(); } diff --git a/pink/rondis/cmd_builder/cmd_table_manager.h b/pink/rondis/cmd_builder/cmd_table_manager.h index 12c09cd4..1753bd58 100644 --- a/pink/rondis/cmd_builder/cmd_table_manager.h +++ b/pink/rondis/cmd_builder/cmd_table_manager.h @@ -25,8 +25,6 @@ class PikaCmdTableManager { private: std::shared_ptr NewCommand(const std::string& opt); - void InsertCurrentThreadDistributionMap(); - std::unique_ptr cmds_; uint32_t cmdId_ = 0;