diff --git a/src/cluster/cluster.cc b/src/cluster/cluster.cc index 72a7f15a338..ed3930787fa 100644 --- a/src/cluster/cluster.cc +++ b/src/cluster/cluster.cc @@ -863,7 +863,7 @@ Status Cluster::CanExecByMySelf(const redis::CommandAttributes *attributes, cons if (myself_ && myself_->role == kClusterSlave && !(attributes->flags & redis::kCmdWrite) && nodes_.find(myself_->master_id) != nodes_.end() && nodes_[myself_->master_id] == slots_nodes_[slot] && - conn->IsFlagEnabled(redis::Connection::KReadOnly)) { + conn->IsFlagEnabled(redis::Connection::kReadOnly)) { return Status::OK(); // My master is serving this slot } diff --git a/src/commands/cmd_cluster.cc b/src/commands/cmd_cluster.cc index 04382ac1710..df0c45efcd0 100644 --- a/src/commands/cmd_cluster.cc +++ b/src/commands/cmd_cluster.cc @@ -317,7 +317,7 @@ class CommandReadOnly : public Commander { public: Status Execute(Server *srv, Connection *conn, std::string *output) override { *output = redis::SimpleString("OK"); - conn->EnableFlag(redis::Connection::KReadOnly); + conn->EnableFlag(redis::Connection::kReadOnly); return Status::OK(); } }; @@ -326,7 +326,7 @@ class CommandReadWrite : public Commander { public: Status Execute(Server *srv, Connection *conn, std::string *output) override { *output = redis::SimpleString("OK"); - conn->DisableFlag(redis::Connection::KReadOnly); + conn->DisableFlag(redis::Connection::kReadOnly); return Status::OK(); } }; diff --git a/src/server/redis_connection.h b/src/server/redis_connection.h index 79b9dd18f8e..c206a1583bc 100644 --- a/src/server/redis_connection.h +++ b/src/server/redis_connection.h @@ -45,7 +45,7 @@ class Connection : public EvbufCallbackBase { kCloseAfterReply = 1 << 6, kCloseAsync = 1 << 7, kMultiExec = 1 << 8, - KReadOnly = 1 << 9, + kReadOnly = 1 << 9, }; explicit Connection(bufferevent *bev, Worker *owner);