Skip to content

Commit

Permalink
revised to pass compile
Browse files Browse the repository at this point in the history
  • Loading branch information
cheniujh committed Jul 31, 2024
1 parent de62327 commit 519598f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pika_consensus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ uint32_t ConsensusCoordinator::term() {
}

void ConsensusCoordinator::InternalApplyFollower(const std::shared_ptr<Cmd>& cmd_ptr) {
g_pika_rm->ScheduleWriteDBTask(std::move(cmd_ptr), db_name_);
g_pika_rm->ScheduleWriteDBTask(cmd_ptr, db_name_);
}

int ConsensusCoordinator::InitCmd(net::RedisParser* parser, const net::RedisCmdArgsType& argv) {
Expand Down
2 changes: 1 addition & 1 deletion src/pika_repl_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void PikaReplClient::ScheduleWriteDBTask(const std::shared_ptr<Cmd>& cmd_ptr, co
const PikaCmdArgsType& argv = cmd_ptr->argv();
std::string dispatch_key = argv.size() >= 2 ? argv[1] : argv[0];
size_t index = GetHashIndexByKey(dispatch_key);
auto task_arg = new ReplClientWriteDBTaskArg(std::move(cmd_ptr));
auto task_arg = new ReplClientWriteDBTaskArg(cmd_ptr);

IncrAsyncWriteDBTaskCount(db_name, 1);
std::function<void()> task_finish_call_back = [this, db_name]() { this->DecrAsyncWriteDBTaskCount(db_name, 1); };
Expand Down
4 changes: 2 additions & 2 deletions src/pika_rm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,8 @@ void PikaReplicaManager::ScheduleWriteBinlogTask(const std::string& db,
pika_repl_client_->ScheduleWriteBinlogTask(db, res, conn, res_private_data);
}

void PikaReplicaManager::ScheduleWriteDBTask(std::shared_ptr<Cmd> cmd_ptr, const std::string& db_name) {
pika_repl_client_->ScheduleWriteDBTask(std::move(cmd_ptr), db_name);
void PikaReplicaManager::ScheduleWriteDBTask(const std::shared_ptr<Cmd>& cmd_ptr, const std::string& db_name) {
pika_repl_client_->ScheduleWriteDBTask(cmd_ptr, db_name);
}

void PikaReplicaManager::ReplServerRemoveClientConn(int fd) { pika_repl_server_->RemoveClientConn(fd); }
Expand Down

0 comments on commit 519598f

Please sign in to comment.