mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
fix(facade): Avoid check on getsockopt SO_INCOMING_NAPI_ID (#2091)
https://github.com/dragonflydb/dragonfly/issues/2090 Signed-off-by: ashotland <ari@dragonflydb.io>
This commit is contained in:
parent
c506e4ca6e
commit
88b4e7dd31
1 changed files with 6 additions and 2 deletions
|
@ -350,8 +350,12 @@ ProactorBase* Listener::PickConnectionProactor(util::FiberSocketBase* sock) {
|
|||
// i.e. when a different CPU is assigned to handle the RX traffic.
|
||||
// On some distributions (WSL1, for example), SO_INCOMING_CPU is not supported.
|
||||
if (0 == getsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU, &cpu, &len)) {
|
||||
CHECK_EQ(0, getsockopt(fd, SOL_SOCKET, SO_INCOMING_NAPI_ID, &napi_id, &len));
|
||||
VLOG(1) << "CPU/NAPI for connection " << fd << " is " << cpu << "/" << napi_id;
|
||||
VLOG(1) << "CPU for connection " << fd << " is " << cpu;
|
||||
// Avoid CHECKINGing success, it sometimes fail on WSL
|
||||
// https://github.com/dragonflydb/dragonfly/issues/2090
|
||||
if (0 == getsockopt(fd, SOL_SOCKET, SO_INCOMING_NAPI_ID, &napi_id, &len)) {
|
||||
VLOG(1) << "NAPI for connection " << fd << " is " << napi_id;
|
||||
}
|
||||
|
||||
if (GetFlag(FLAGS_conn_use_incoming_cpu)) {
|
||||
const vector<unsigned>& ids = pool()->MapCpuToThreads(cpu);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue