Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
eos
QuarkDB
Commits
a3b113d6
Commit
a3b113d6
authored
Sep 04, 2018
by
Georgios Bitzes
Browse files
Add quarkdb-version command to just retrieve the version of a running node
parent
af0a5fb8
Pipeline
#499918
failed with stages
in 62 minutes and 40 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.ignore
View file @
a3b113d6
build/
deps/rocksdb/
deps/backward-cpp/
deps/googletest/
src/Commands.cc
View file @
a3b113d6
...
...
@@ -137,6 +137,7 @@ struct cmdMapInit {
redis_cmd_map
[
"quarkdb_manual_compaction"
]
=
{
RedisCommand
::
QUARKDB_MANUAL_COMPACTION
,
CommandType
::
QUARKDB
};
redis_cmd_map
[
"quarkdb_level_stats"
]
=
{
RedisCommand
::
QUARKDB_LEVEL_STATS
,
CommandType
::
QUARKDB
};
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
[
"recovery_info"
]
=
{
RedisCommand
::
RECOVERY_INFO
,
CommandType
::
RECOVERY
};
redis_cmd_map
[
"recovery_set"
]
=
{
RedisCommand
::
RECOVERY_SET
,
CommandType
::
RECOVERY
};
...
...
src/Commands.hh
View file @
a3b113d6
...
...
@@ -142,6 +142,7 @@ enum class RedisCommand {
QUARKDB_MANUAL_COMPACTION
,
QUARKDB_LEVEL_STATS
,
QUARKDB_COMPRESSION_STATS
,
QUARKDB_VERSION
,
RECOVERY_GET
,
RECOVERY_SET
,
...
...
src/QuarkDBNode.cc
View file @
a3b113d6
...
...
@@ -130,6 +130,9 @@ LinkStatus QuarkDBNode::dispatch(Connection *conn, RedisRequest &req) {
case
RedisCommand
::
QUARKDB_INFO
:
{
return
conn
->
statusVector
(
this
->
info
().
toVector
());
}
case
RedisCommand
::
QUARKDB_VERSION
:
{
return
conn
->
string
(
VERSION_FULL_STRING
);
}
case
RedisCommand
::
CONVERT_STRING_TO_INT
:
case
RedisCommand
::
CONVERT_INT_TO_STRING
:
{
return
conn
->
raw
(
handleConversion
(
req
));
...
...
test/e2e.cc
View file @
a3b113d6
...
...
@@ -27,6 +27,7 @@
#include "raft/RaftCommitTracker.hh"
#include "raft/RaftConfig.hh"
#include "raft/RaftContactDetails.hh"
#include "Version.hh"
#include "Poller.hh"
#include "Configuration.hh"
#include "QuarkDBNode.hh"
...
...
@@ -1192,6 +1193,7 @@ TEST_F(Raft_e2e, smove) {
ASSERT_REPLY
(
tunnel
(
leaderID
)
->
exec
(
"smembers"
,
"set1"
),
make_vec
(
"i2"
,
"i3"
,
"i4"
,
"i5"
));
ASSERT_REPLY
(
tunnel
(
leaderID
)
->
exec
(
"smembers"
,
"set2"
),
make_vec
(
"i1"
,
"t1"
,
"t2"
,
"t3"
,
"t4"
,
"t5"
));
ASSERT_REPLY
(
tunnel
(
leaderID
)
->
exec
(
"quarkdb-manual-compaction"
),
"OK"
);
ASSERT_REPLY
(
tunnel
(
leaderID
)
->
exec
(
"quarkdb-version"
),
VERSION_FULL_STRING
);
qdb_info
(
qclient
::
describeRedisReply
(
tunnel
(
leaderID
)
->
exec
(
"quarkdb-level-stats"
).
get
()));
qdb_info
(
qclient
::
describeRedisReply
(
tunnel
(
leaderID
)
->
exec
(
"quarkdb-compression-stats"
).
get
()));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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