Skip to content

Commit

Permalink
Update pika_slot.cc (OpenAtomFoundation#1426)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pikachu authored May 4, 2023
1 parent 601d023 commit 3998ba1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pika_slot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ void SlotsHashKeyCmd::DoInitial() {
void SlotsHashKeyCmd::Do(std::shared_ptr<Partition> partition) {
res_.AppendArrayLen(argv_.size() - 1);
std::shared_ptr<Table> table_ptr = g_pika_server->GetTable(g_pika_conf->default_table());
uint32_t partition_num = table_ptr->PartitionNum();
if (!table_ptr) {
res_.SetRes(CmdRes::kInvalidParameter, kCmdNameSlotsHashKey);
return;
}
uint32_t partition_num = table_ptr->PartitionNum();
// iter starts from real key, first item in argv_ is command name
std::vector<std::string>::const_iterator iter = argv_.begin() + 1;
for (; iter != argv_.end(); iter++) {
Expand Down

0 comments on commit 3998ba1

Please sign in to comment.