Skip to content

Commit

Permalink
modify spop interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Axlgrep committed Jul 25, 2018
1 parent c2beacf commit 1233e87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/pika_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ void SPopCmd::DoInitial(PikaCmdArgsType &argv, const CmdInfo* const ptr_info) {
}

void SPopCmd::Do() {
std::vector<std::string> members;
rocksdb::Status s = g_pika_server->db()->SPop(key_, 1, &members);
std::string member;
rocksdb::Status s = g_pika_server->db()->SPop(key_, &member);
if (s.ok()) {
res_.AppendStringLen(members[0].size());
res_.AppendContent(members[0]);
res_.AppendStringLen(member.size());
res_.AppendContent(member);
} else if (s.IsNotFound()) {
res_.AppendContent("$-1");
} else {
Expand Down
2 changes: 1 addition & 1 deletion third/blackwidow

0 comments on commit 1233e87

Please sign in to comment.