Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
eos
QuarkDB
Commits
fe2a76ff
Commit
fe2a76ff
authored
Sep 17, 2019
by
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
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
fe2a76ff
...
...
@@ -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``
.
...
...
src/Commands.cc
View file @
fe2a76ff
...
...
@@ -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.
...
...
src/Commands.hh
View file @
fe2a76ff
...
...
@@ -158,7 +158,7 @@ enum class RedisCommand {
QUARKDB_COMPRESSION_STATS
,
QUARKDB_VERSION
,
QUARKDB_CHECKPOINT
,
QUARKDB_HEALTH
_LOCAL
,
QUARKDB_HEALTH
,
RECOVERY_GET
,
RECOVERY_SET
,
...
...
src/Shard.cc
View file @
fe2a76ff
...
...
@@ -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
->
get
Local
Health
();
localHealth
=
standaloneGroup
->
getHealth
();
}
else
if
(
raftGroup
)
{
localHealth
=
raftGroup
->
dispatcher
()
->
get
Local
Health
();
localHealth
=
raftGroup
->
dispatcher
()
->
getHealth
();
}
return
conn
->
raw
(
Formatter
::
localHealth
(
localHealth
));
...
...
src/StandaloneGroup.cc
View file @
fe2a76ff
...
...
@@ -57,7 +57,7 @@ Dispatcher* StandaloneGroup::getDispatcher() {
//------------------------------------------------------------------------------
// Return health information
//------------------------------------------------------------------------------
LocalHealth
StandaloneGroup
::
get
Local
Health
()
{
LocalHealth
StandaloneGroup
::
getHealth
()
{
return
LocalHealth
(
VERSION_FULL_STRING
,
stateMachine
->
getHealthIndicators
());
}
...
...
src/StandaloneGroup.hh
View file @
fe2a76ff
...
...
@@ -60,7 +60,7 @@ public:
//----------------------------------------------------------------------------
// Return health information
//----------------------------------------------------------------------------
LocalHealth
get
Local
Health
();
LocalHealth
getHealth
();
private:
ShardDirectory
&
shardDirectory
;
...
...
src/raft/RaftDispatcher.cc
View file @
fe2a76ff
...
...
@@ -655,7 +655,7 @@ RaftVoteResponse RaftDispatcher::requestVote(RaftVoteRequest &req) {
//------------------------------------------------------------------------------
// Return health information
//------------------------------------------------------------------------------
LocalHealth
RaftDispatcher
::
get
Local
Health
()
{
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
()));
...
...
src/raft/RaftDispatcher.hh
View file @
fe2a76ff
...
...
@@ -65,7 +65,7 @@ public:
//----------------------------------------------------------------------------
// Return health information
//----------------------------------------------------------------------------
LocalHealth
get
Local
Health
();
LocalHealth
getHealth
();
private:
RaftHeartbeatResponse
heartbeat
(
const
RaftHeartbeatRequest
&
req
,
RaftStateSnapshotPtr
&
snapshot
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment