caipengbo commented on code in PR #2498:
URL: https://github.com/apache/kvrocks/pull/2498#discussion_r1730366878
##########
src/server/server.cc:
##########
@@ -2115,3 +2122,40 @@ AuthResult Server::AuthenticateUser(const std::string
&user_password, std::strin
*ns = kDefaultNamespace;
return AuthResult::IS_ADMIN;
}
+
+void Server::evictionClients() {
+ size_t mem = 0;
+ for (const auto &t : worker_threads_) {
+ mem += t->GetWorker()->GetConnectionsMemoryUsed();
+ }
+ if (mem < config_->max_memory_clients) {
+ return;
+ }
+
+ std::vector<redis::Connection *> conns;
+ for (const auto &t : worker_threads_) {
+ auto worker_conns = t->GetWorker()->GetConnections();
+ for (const auto &iter : worker_conns) {
+ conns.push_back(iter.second);
Review Comment:
@git-hulk I think there's something wrong here. Am I missing something?
--
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]