torwig commented on code in PR #2276:
URL: https://github.com/apache/kvrocks/pull/2276#discussion_r1591800389


##########
src/server/server.cc:
##########
@@ -1091,15 +1090,15 @@ void Server::SetLastRandomKeyCursor(const std::string 
&cursor) {
 }
 
 int64_t Server::GetCachedUnixTime() {
-  if (unix_time.load() == 0) {
+  if (unix_time_secs.load() == 0) {
     updateCachedTime();
   }
-  return unix_time.load();
+  return unix_time_secs.load();
 }
 
 int64_t Server::GetLastBgsaveTime() {
   std::lock_guard<std::mutex> lg(db_job_mu_);
-  return last_bgsave_time_ == -1 ? start_time_ : last_bgsave_time_;
+  return last_bgsave_timestamp_secs_ == -1 ? start_time_secs_ : 
last_bgsave_duration_secs_;

Review Comment:
   Should `last_bgsave_duration_secs_` be replaced with 
`last_bgsave_timestamp_secs_` in this line? I mean, we return the timestamp not 
the duration.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to