From cef7a2ebd503827652299c5a6a5ee3e32d9a06a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Szab=C3=B3?= Date: Mon, 16 Dec 2024 11:07:27 +0100 Subject: [PATCH] Remove redundant logging from CarbonRouterInstance deleter --- mcrouter/CarbonRouterInstance-inl.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/mcrouter/CarbonRouterInstance-inl.h b/mcrouter/CarbonRouterInstance-inl.h index 32773a81c..bfb385f05 100644 --- a/mcrouter/CarbonRouterInstance-inl.h +++ b/mcrouter/CarbonRouterInstance-inl.h @@ -18,10 +18,6 @@ #include #include -#ifndef MCROUTER_OSS_BUILD -#include -#endif - #include "mcrouter/AsyncWriter.h" #include "mcrouter/CarbonRouterInstanceBase.h" #include "mcrouter/ExecutorObserver.h" @@ -131,15 +127,8 @@ CarbonRouterInstance* CarbonRouterInstance::createRaw( initFailureLogger(); } - // Deleter is only called if unique_ptr::get() returns non-null. - auto deleter = [](CarbonRouterInstance* inst) { -#ifdef MCROUTER_OSS_BUILD - FB_LOG_EVERY_MS(WARNING, 10000) << "Destroying CarbonRouterInstance"; -#else - LOG_EVERY_MS(WARNING, 10000) << "Destroying CarbonRouterInstance"; -#endif - delete inst; - }; + // Custom deleter since ~CarbonRouterInstance() is private. + auto deleter = [](CarbonRouterInstance* inst) { delete inst; }; auto router = std::unique_ptr, decltype(deleter)>( new CarbonRouterInstance(std::move(input_options)),