This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 38512b73 Add the compatible Redis version to the info command (#1158)
38512b73 is described below
commit 38512b73bf25ca07de3c4341f60ca8ef3343414a
Author: xiaobiaozhao <[email protected]>
AuthorDate: Wed Dec 7 00:48:35 2022 +0800
Add the compatible Redis version to the info command (#1158)
---
src/server/server.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/server/server.cc b/src/server/server.cc
index 43003cc6..daccf0a2 100644
--- a/src/server/server.cc
+++ b/src/server/server.cc
@@ -44,6 +44,7 @@
#include "worker.h"
std::atomic<int> Server::unix_time_ = {0};
+constexpr const char *REDIS_VERSION = "4.0.0";
Server::Server(Engine::Storage *storage, Config *config) : storage_(storage),
config_(config) {
// init commands stats here to prevent concurrent insert, and cause core
@@ -783,6 +784,7 @@ void Server::GetServerInfo(std::string *info) {
time(&now);
string_stream << "# Server\r\n";
string_stream << "version:" << VERSION << "\r\n";
+ string_stream << "redis_version:" << REDIS_VERSION << "\r\n";
string_stream << "git_sha1:" << GIT_COMMIT << "\r\n";
string_stream << "os:" << name.sysname << " " << name.release << " " <<
name.machine << "\r\n";
#ifdef __GNUC__