Skip to content

Commit

Permalink
remove unsed code
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyuecai committed Jul 19, 2024
1 parent 0258654 commit d5bdcb8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion include/pika_client_conn.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ class PikaClientConn : public net::RedisConn {
void RemoveWatchedKeys();
void SetTxnFailedFromKeys(const std::vector<std::string>& db_keys);
void SetTxnFailedIfKeyExists(const std::string target_db_name = "");
void SetTxnFailedFromDBs(std::string db_name);
void ExitTxn();
bool IsInTxn();
bool IsTxnInitFailed();
Expand Down
12 changes: 0 additions & 12 deletions src/pika_client_conn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -428,18 +428,6 @@ void PikaClientConn::SetTxnFailedIfKeyExists(std::string target_db_name) {
}
}

void PikaClientConn::SetTxnFailedFromDBs(std::string db_name) {
auto dispatcher = dynamic_cast<net::DispatchThread*>(server_thread());
if (dispatcher != nullptr) {
auto involved_conns = dispatcher->GetDBTxns(db_name);
for (auto& conn : involved_conns) {
if (auto c = std::dynamic_pointer_cast<PikaClientConn>(conn); c != nullptr) {
c->SetTxnWatchFailState(true);
}
}
}
}

void PikaClientConn::ExitTxn() {
if (IsInTxn()) {
RemoveWatchedKeys();
Expand Down

0 comments on commit d5bdcb8

Please sign in to comment.