Skip to content

Commit

Permalink
fix: fix data race around spop Dobinlog (OpenAtomFoundation#2674)
Browse files Browse the repository at this point in the history
* fix spop binlog data race

* adjust format

---------

Co-authored-by: cjh <1271435567@qq.com>
  • Loading branch information
2 people authored and chenbt-hz committed Jun 3, 2024
1 parent 0e3c90a commit 22d7c15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/pika_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ class SPopCmd : public Cmd {
public:
SPopCmd(const std::string& name, int arity, uint32_t flag)
: Cmd(name, arity, flag, static_cast<uint32_t>(AclCategory::SET)) {
srem_cmd_ = std::make_shared<SRemCmd>(kCmdNameSRem, -3, kCmdFlagsWrite | kCmdFlagsSet);
}
srem_cmd_ = std::make_shared<SRemCmd>(kCmdNameSRem, -3, kCmdFlagsWrite | kCmdFlagsSet);
}
SPopCmd(const SPopCmd& other)
: Cmd(other), key_(other.key_), members_(other.members_), count_(other.count_), s_(other.s_) {
srem_cmd_ = std::make_shared<SRemCmd>(kCmdNameSRem, -3, kCmdFlagsWrite | kCmdFlagsSet);
}
std::vector<std::string> current_key() const override {
std::vector<std::string> res;
res.push_back(key_);
Expand Down

0 comments on commit 22d7c15

Please sign in to comment.