caipengbo commented on code in PR #2498:
URL: https://github.com/apache/kvrocks/pull/2498#discussion_r1729173952
##########
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:
The reply will be added to libevent's evbuffer. Will the data accumulate in
the evbuffer?
--
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]