You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "enjoy-binbin (via GitHub)" <gi...@apache.org> on 2023/08/27 08:13:45 UTC
[GitHub] [kvrocks] enjoy-binbin commented on a diff in pull request #1702: Add LASTSAVE command
enjoy-binbin commented on code in PR #1702:
URL: https://github.com/apache/kvrocks/pull/1702#discussion_r1306621478
##########
src/commands/cmd_server.cc:
##########
@@ -978,6 +978,19 @@ static uint64_t GenerateConfigFlag(const std::vector<std::string> &args) {
return 0;
}
+class CommandLastSave : public Commander {
+ public:
+ Status Execute(Server *svr, Connection *conn, std::string *output) override {
+ if (!conn->IsAdmin()) {
+ return {Status::RedisExecErr, errAdminPermissionRequired};
+ }
+
+ int unix_sec = svr->GetLastBgsaveTime();
Review Comment:
```suggestion
std::int64_t unix_sec = svr->GetLastBgsaveTime();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org