Skip to content

Commit

Permalink
fix: fix data race around spop Dobinlog (#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
cheniujh and cjh committed May 24, 2024
1 parent 6cd3e64 commit 1b2bfbe
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 1b2bfbe

Please sign in to comment.