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 <[email protected]>
  • Loading branch information
cheniujh and cheniujh authored May 24, 2024
1 parent e9792ba commit bd54c1e
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 bd54c1e

Please sign in to comment.