git-hulk commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1381020139
##########
src/server/worker.cc:
##########
@@ -252,7 +252,8 @@ Status Worker::listenTCP(const std::string &host, uint32_t
port, int backlog) {
}
evutil_make_socket_nonblocking(fd);
- auto lev = NewEvconnlistener<&Worker::newTCPConnection>(base_,
LEV_OPT_CLOSE_ON_FREE, backlog, fd);
+ auto lev =
+ NewEvconnlistener<&Worker::newTCPConnection>(base_, LEV_OPT_THREADSAFE
| LEV_OPT_CLOSE_ON_FREE, backlog, fd);
Review Comment:
Yes, I guess it will affect the performance since it needs an extra lock and
unlock operation. But it should be fine since the bottlenecks of accept
connections won't be here. Let's me have a performance compare later.
--
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]