AntiTopQuark commented on code in PR #2498:
URL: https://github.com/apache/kvrocks/pull/2498#discussion_r1730203259
##########
src/server/worker.cc:
##########
@@ -446,6 +452,13 @@ Status Worker::Reply(int fd, const std::string &reply) {
auto iter = conns_.find(fd);
if (iter != conns_.end()) {
iter->second->SetLastInteraction();
+ if (iter->second->CheckClientReachOBufLimits(reply.size())) {
+ srv->stats.IncrReachOutbufLimitDisconnections();
+ // unlock before calling FreeConnectionByID, otherwise it will cause
nested deadlock
+ lock.unlock();
+ FreeConnectionByID(iter->first, iter->second->GetID());
+ return {Status::NotOK, "connection reach output buffer limits"};
+ }
redis::Reply(iter->second->Output(), reply);
Review Comment:
Do you mean that publishing a large number of small messages caused the
module consuming the `evbuffer` to not process them immediately, leading to
memory bloat?
--
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]