Commit fe2a76ff authored by Georgios Bitzes's avatar Georgios Bitzes
Browse files

Rename quarkdb-health-local to just quarkdb-health

parent 90a10529
Pipeline #1099050 passed with stages
in 51 minutes and 7 seconds
......@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
## Unreleased
- A race condition was sometimes causing elections to fail spuriously, making
the election of a stable leader to require slightly more rounds than it should have.
- Implementation of health indicators through ``QUARKDB-HEALTH-LOCAL`` command.
- Implementation of health indicators through ``QUARKDB-HEALTH`` command.
- Added support for RESPv3 push types, activated on a per-client basis through
``ACTIVATE-PUSH-TYPES`` command.
- Add convenience command ``DEQUE-CLEAR``.
......
......@@ -151,7 +151,7 @@ struct cmdMapInit {
redis_cmd_map["quarkdb_compression_stats"] = {RedisCommand::QUARKDB_COMPRESSION_STATS, CommandType::QUARKDB};
redis_cmd_map["quarkdb_version"] = {RedisCommand::QUARKDB_VERSION, CommandType::QUARKDB};
redis_cmd_map["quarkdb_checkpoint"] = {RedisCommand::QUARKDB_CHECKPOINT, CommandType::QUARKDB};
redis_cmd_map["quarkdb_health_local"] = {RedisCommand::QUARKDB_HEALTH_LOCAL, CommandType::QUARKDB};
redis_cmd_map["quarkdb_health"] = {RedisCommand::QUARKDB_HEALTH, CommandType::QUARKDB};
// Compatibility: Keep raft_checkpoint, make identical to quarkdb_checkpoint.
// Maybe remove in a few versions.
......
......@@ -158,7 +158,7 @@ enum class RedisCommand {
QUARKDB_COMPRESSION_STATS,
QUARKDB_VERSION,
QUARKDB_CHECKPOINT,
QUARKDB_HEALTH_LOCAL,
QUARKDB_HEALTH,
RECOVERY_GET,
RECOVERY_SET,
......
......@@ -221,7 +221,7 @@ LinkStatus Shard::dispatch(Connection *conn, RedisRequest &req) {
return conn->status(ss.str());
}
case RedisCommand::QUARKDB_HEALTH_LOCAL: {
case RedisCommand::QUARKDB_HEALTH: {
if(req.size() != 1) return conn->errArgs(req[0]);
InFlightRegistration registration(inFlightTracker);
......@@ -232,10 +232,10 @@ LinkStatus Shard::dispatch(Connection *conn, RedisRequest &req) {
LocalHealth localHealth;
if(standaloneGroup) {
localHealth = standaloneGroup->getLocalHealth();
localHealth = standaloneGroup->getHealth();
}
else if(raftGroup) {
localHealth = raftGroup->dispatcher()->getLocalHealth();
localHealth = raftGroup->dispatcher()->getHealth();
}
return conn->raw(Formatter::localHealth(localHealth));
......
......@@ -57,7 +57,7 @@ Dispatcher* StandaloneGroup::getDispatcher() {
//------------------------------------------------------------------------------
// Return health information
//------------------------------------------------------------------------------
LocalHealth StandaloneGroup::getLocalHealth() {
LocalHealth StandaloneGroup::getHealth() {
return LocalHealth(VERSION_FULL_STRING, stateMachine->getHealthIndicators());
}
......
......@@ -60,7 +60,7 @@ public:
//----------------------------------------------------------------------------
// Return health information
//----------------------------------------------------------------------------
LocalHealth getLocalHealth();
LocalHealth getHealth();
private:
ShardDirectory &shardDirectory;
......
......@@ -655,7 +655,7 @@ RaftVoteResponse RaftDispatcher::requestVote(RaftVoteRequest &req) {
//------------------------------------------------------------------------------
// Return health information
//------------------------------------------------------------------------------
LocalHealth RaftDispatcher::getLocalHealth() {
LocalHealth RaftDispatcher::getHealth() {
std::vector<HealthIndicator> indicators = stateMachine.getHealthIndicators();
//----------------------------------------------------------------------------
......@@ -663,7 +663,7 @@ LocalHealth RaftDispatcher::getLocalHealth() {
//----------------------------------------------------------------------------
RaftStateSnapshotPtr snapshot = state.getSnapshot();
if(snapshot->leader.empty()) {
indicators.emplace_back(HealthStatus::kRed, "PART-OF-QUORUM", "No, I don't know who the cluster leader is, node is unavailable");
indicators.emplace_back(HealthStatus::kRed, "PART-OF-QUORUM", "No");
}
else {
indicators.emplace_back(HealthStatus::kGreen, "PART-OF-QUORUM", SSTR("Yes | LEADER " << snapshot->leader.toString()));
......
......@@ -65,7 +65,7 @@ public:
//----------------------------------------------------------------------------
// Return health information
//----------------------------------------------------------------------------
LocalHealth getLocalHealth();
LocalHealth getHealth();
private:
RaftHeartbeatResponse heartbeat(const RaftHeartbeatRequest &req, RaftStateSnapshotPtr &snapshot);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment