Paragrf commented on code in PR #3378:
URL: https://github.com/apache/kvrocks/pull/3378#discussion_r2870622451


##########
src/server/server.cc:
##########
@@ -994,10 +995,100 @@ void Server::cron() {
     }
 
     CleanupExitedSlaves();
+
+    // CLIENT PAUSE timeout check
+    if (client_pause_end_time_ != 0) {
+      uint64_t now_ms = util::GetTimeStampMS();
+      if (now_ms >= client_pause_end_time_) {
+        ClientPauseUnpause();
+      }
+    }
+
     recordInstantaneousMetrics();
   }
 }
 
+void Server::SetClientPause(uint64_t end_time_ms, PauseMode mode) {
+  std::lock_guard<std::mutex> lock(client_pause_mu_);
+  client_pause_end_time_ = end_time_ms;
+  client_pause_mode_ = mode;
+}
+
+void Server::ClientPauseUnpause() {

Review Comment:
   DONE



-- 
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