chore: reset enable_direct_fd to avoid socket leakage in kernel (#3051)

The leakage can be identified by checking /proc/net/sockstat
Fixes #3045

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-05-16 09:44:53 +03:00 committed by GitHub
parent 6b8a8b6410
commit 73e44a941e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -79,6 +79,10 @@ ABSL_FLAG(bool, version_check, true,
ABSL_FLAG(uint16_t, tcp_backlog, 128, "TCP listen(2) backlog parameter.");
#ifdef __linux__
ABSL_DECLARE_FLAG(bool, enable_direct_fd);
#endif
using namespace util;
using namespace facade;
using namespace io;
@ -716,6 +720,10 @@ Usage: dragonfly [FLAGS]
unique_ptr<util::ProactorPool> pool;
#ifdef __linux__
// NOTE: Seems that enable_direct_fd causes sockets leakage.
// Until it is fixed in helio, we disable it.
absl::SetFlag(&FLAGS_enable_direct_fd, false);
base::sys::KernelVersion kver;
base::sys::GetKernelVersion(&kver);