Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autotools build #457

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove redundant logging from CarbonRouterInstance deleter
  • Loading branch information
mszabo-wikia committed Dec 16, 2024
commit 9516a3f6795457df5a853642061c473f7ba8cbec
15 changes: 2 additions & 13 deletions mcrouter/CarbonRouterInstance-inl.h
Original file line number Diff line number Diff line change
@@ -18,10 +18,6 @@
#include <folly/io/async/EventBase.h>
#include <folly/json/DynamicConverter.h>

#ifndef MCROUTER_OSS_BUILD
#include <common/logging/logging.h>
#endif

#include "mcrouter/AsyncWriter.h"
#include "mcrouter/CarbonRouterInstanceBase.h"
#include "mcrouter/ExecutorObserver.h"
@@ -131,15 +127,8 @@ CarbonRouterInstance<RouterInfo>* CarbonRouterInstance<RouterInfo>::createRaw(
initFailureLogger();
}

// Deleter is only called if unique_ptr::get() returns non-null.
auto deleter = [](CarbonRouterInstance<RouterInfo>* 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<RouterInfo>* inst) { delete inst; };
auto router =
std::unique_ptr<CarbonRouterInstance<RouterInfo>, decltype(deleter)>(
new CarbonRouterInstance<RouterInfo>(std::move(input_options)),