From 2bf49f050817ef100dcc89f488ea1bc380ab4f91 Mon Sep 17 00:00:00 2001 From: Anton Likhtarov Date: Wed, 2 Oct 2024 18:52:35 -0700 Subject: [PATCH] RoutingGroups: generate explicit `false` specializations; remove default Summary: Two problems with the current "default false" approach: 1) If the specialization file is not included in a translation unit, the request will incorrectly default to false. In this new approach this will be a compile error - the correct routing groups file must be included. 2) Default false means some bugs snuck in (using GetLike with something that's not a request type, e.g. a reply or void by mistake) - see stacked diffs for fixes. Changes in this diff: 1) New special routing group "no_group" to list requests for which all *Like traits should be false. The invariant is that every request must belong to one and only one group. 2) Removes default false, and introduces explicit true/false specializations for all requests. Reviewed By: disylh, stuclar, antonf Differential Revision: D62321258 fbshipit-source-id: b27f1fe3c61513b31578ba48cf16ed8a2df28138 --- mcrouter/lib/carbon/RoutingGroups.h | 16 +- mcrouter/lib/carbon/example/HelloGoodbye.idl | 6 + .../example/gen/HelloGoodbyeRouterInfo.h | 1 + .../example/gen/HelloGoodbyeRoutingGroups.h | 66 +++ mcrouter/lib/carbon/test/A.idl | 6 + mcrouter/lib/carbon/test/B.idl | 6 + mcrouter/lib/carbon/test/CarbonTest.idl | 7 + mcrouter/lib/carbon/test/CarbonThriftTest.idl | 8 + mcrouter/lib/carbon/test/JsonClientTest.cpp | 1 + mcrouter/lib/carbon/test/gen/ARouteHandleIf.h | 1 + mcrouter/lib/carbon/test/gen/ARouterInfo.h | 1 + mcrouter/lib/carbon/test/gen/ARoutingGroups.h | 46 ++ mcrouter/lib/carbon/test/gen/BRouterInfo.h | 1 + mcrouter/lib/carbon/test/gen/BRoutingGroups.h | 46 ++ .../carbon/test/gen/CarbonTestRouterInfo.h | 1 + .../carbon/test/gen/CarbonTestRoutingGroups.h | 66 +++ .../test/gen/CarbonThriftTestRouterInfo.h | 1 + .../test/gen/CarbonThriftTestRoutingGroups.h | 86 ++++ mcrouter/lib/network/Memcache.idl | 10 + .../lib/network/gen/MemcacheRoutingGroups.h | 400 ++++++++++++++++++ .../test/AsyncMcServerShutdownTest.cpp | 1 + 21 files changed, 765 insertions(+), 12 deletions(-) create mode 100644 mcrouter/lib/carbon/example/gen/HelloGoodbyeRoutingGroups.h create mode 100644 mcrouter/lib/carbon/test/gen/ARoutingGroups.h create mode 100644 mcrouter/lib/carbon/test/gen/BRoutingGroups.h create mode 100644 mcrouter/lib/carbon/test/gen/CarbonTestRoutingGroups.h create mode 100644 mcrouter/lib/carbon/test/gen/CarbonThriftTestRoutingGroups.h diff --git a/mcrouter/lib/carbon/RoutingGroups.h b/mcrouter/lib/carbon/RoutingGroups.h index b3cd9da5f..8f23e0c4b 100644 --- a/mcrouter/lib/carbon/RoutingGroups.h +++ b/mcrouter/lib/carbon/RoutingGroups.h @@ -40,9 +40,7 @@ constexpr auto kUpdateKey = folly::makeFixedString("update_like"); * Request is get-like. */ template -struct GetLike { - static const bool value = false; -}; +struct GetLike; template using GetLikeT = typename GetLike::Type; @@ -57,9 +55,7 @@ using GetLikeT = typename GetLike::Type; * Request is update-like. */ template -struct UpdateLike { - static const bool value = false; -}; +struct UpdateLike; template using UpdateLikeT = typename UpdateLike::Type; @@ -74,9 +70,7 @@ using UpdateLikeT = typename UpdateLike::Type; * Request is delete-like. */ template -struct DeleteLike { - static const bool value = false; -}; +struct DeleteLike; template using DeleteLikeT = typename DeleteLike::Type; @@ -92,9 +86,7 @@ using DeleteLikeT = typename DeleteLike::Type; * Request is arithmetic-like. */ template -struct ArithmeticLike { - static const bool value = false; -}; +struct ArithmeticLike; template using ArithmeticLikeT = typename ArithmeticLike::Type; diff --git a/mcrouter/lib/carbon/example/HelloGoodbye.idl b/mcrouter/lib/carbon/example/HelloGoodbye.idl index f6b70a6e8..99d86ce00 100644 --- a/mcrouter/lib/carbon/example/HelloGoodbye.idl +++ b/mcrouter/lib/carbon/example/HelloGoodbye.idl @@ -60,6 +60,12 @@ service { DuplicateRoute @ "mcrouter/lib/carbon/example/DuplicateRoute.h", CarbonLookasideRoute @ "mcrouter/lib/carbon/example/CarbonLookasideRoute.h" ]; + routing_groups: { + no_group: [ + HelloRequest, + GoodbyeRequest, + ] + }; gen_client_tool: true; compression_by_type: true; }; diff --git a/mcrouter/lib/carbon/example/gen/HelloGoodbyeRouterInfo.h b/mcrouter/lib/carbon/example/gen/HelloGoodbyeRouterInfo.h index da7513883..0fbfa8e48 100644 --- a/mcrouter/lib/carbon/example/gen/HelloGoodbyeRouterInfo.h +++ b/mcrouter/lib/carbon/example/gen/HelloGoodbyeRouterInfo.h @@ -24,6 +24,7 @@ #include "mcrouter/lib/carbon/example/gen/HelloGoodbyeRouteHandleIf.h" #include "mcrouter/lib/carbon/example/gen/HelloGoodbyeRouterStats.h" +#include "mcrouter/lib/carbon/example/gen/HelloGoodbyeRoutingGroups.h" // Forward declarations namespace folly { diff --git a/mcrouter/lib/carbon/example/gen/HelloGoodbyeRoutingGroups.h b/mcrouter/lib/carbon/example/gen/HelloGoodbyeRoutingGroups.h new file mode 100644 index 000000000..c732ef4fa --- /dev/null +++ b/mcrouter/lib/carbon/example/gen/HelloGoodbyeRoutingGroups.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. + * + */ + +/* + * THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN + * VAIN. + * + * @generated + */ +#pragma once + +#include + +#include "mcrouter/lib/carbon/example/gen/HelloGoodbyeMessages.h" + +namespace carbon { + +// ArithmeticLike +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +// DeleteLike +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +// GetLike +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +// UpdateLike +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; +} // namespace carbon diff --git a/mcrouter/lib/carbon/test/A.idl b/mcrouter/lib/carbon/test/A.idl index cd1737296..c8fd3265b 100644 --- a/mcrouter/lib/carbon/test/A.idl +++ b/mcrouter/lib/carbon/test/A.idl @@ -29,4 +29,10 @@ reply TestAReply { service { enable_shutdown: true; + + routing_groups: { + no_group: [ + TestARequest, + ] + }; }; diff --git a/mcrouter/lib/carbon/test/B.idl b/mcrouter/lib/carbon/test/B.idl index e22c1b301..82142632e 100644 --- a/mcrouter/lib/carbon/test/B.idl +++ b/mcrouter/lib/carbon/test/B.idl @@ -28,4 +28,10 @@ reply TestBReply { service { enable_shutdown: true; + + routing_groups: { + no_group: [ + TestBRequest, + ] + }; }; diff --git a/mcrouter/lib/carbon/test/CarbonTest.idl b/mcrouter/lib/carbon/test/CarbonTest.idl index 4c389da5d..220ebefa3 100644 --- a/mcrouter/lib/carbon/test/CarbonTest.idl +++ b/mcrouter/lib/carbon/test/CarbonTest.idl @@ -202,4 +202,11 @@ struct StructWithOptionalEnumInt8 { service { enable_shutdown: true; + + routing_groups: { + no_group: [ + TestRequest, + TestRequestStringKey, + ] + }; }; diff --git a/mcrouter/lib/carbon/test/CarbonThriftTest.idl b/mcrouter/lib/carbon/test/CarbonThriftTest.idl index ee71e86ec..655c59cdd 100644 --- a/mcrouter/lib/carbon/test/CarbonThriftTest.idl +++ b/mcrouter/lib/carbon/test/CarbonThriftTest.idl @@ -111,4 +111,12 @@ service { enable_shutdown: true; gen_client_tool: false; thrift_tm_thread: true; + + routing_groups: { + no_group: [ + ThriftTestRequest, + DummyThriftRequest, + CustomRequest, + ] + }; }; diff --git a/mcrouter/lib/carbon/test/JsonClientTest.cpp b/mcrouter/lib/carbon/test/JsonClientTest.cpp index 2dd1d8812..f7fcaf7a4 100644 --- a/mcrouter/lib/carbon/test/JsonClientTest.cpp +++ b/mcrouter/lib/carbon/test/JsonClientTest.cpp @@ -13,6 +13,7 @@ #include "mcrouter/lib/carbon/CmdLineClient.h" #include "mcrouter/lib/carbon/JsonClient.h" #include "mcrouter/lib/carbon/test/gen/CarbonTest.h" +#include "mcrouter/lib/carbon/test/gen/CarbonTestRoutingGroups.h" #include "mcrouter/lib/mc/msg.h" #include "mcrouter/lib/network/AsyncMcServer.h" #include "mcrouter/lib/network/AsyncMcServerWorker.h" diff --git a/mcrouter/lib/carbon/test/gen/ARouteHandleIf.h b/mcrouter/lib/carbon/test/gen/ARouteHandleIf.h index bea3001ab..dace6b28c 100644 --- a/mcrouter/lib/carbon/test/gen/ARouteHandleIf.h +++ b/mcrouter/lib/carbon/test/gen/ARouteHandleIf.h @@ -20,6 +20,7 @@ #include #include "mcrouter/lib/carbon/test/gen/AMessages.h" +#include "mcrouter/lib/carbon/test/gen/BRoutingGroups.h" namespace carbon { namespace test { diff --git a/mcrouter/lib/carbon/test/gen/ARouterInfo.h b/mcrouter/lib/carbon/test/gen/ARouterInfo.h index c9f4616f9..0b25bf158 100644 --- a/mcrouter/lib/carbon/test/gen/ARouterInfo.h +++ b/mcrouter/lib/carbon/test/gen/ARouterInfo.h @@ -24,6 +24,7 @@ #include "mcrouter/lib/carbon/test/gen/ARouteHandleIf.h" #include "mcrouter/lib/carbon/test/gen/ARouterStats.h" +#include "mcrouter/lib/carbon/test/gen/ARoutingGroups.h" // Forward declarations namespace folly { diff --git a/mcrouter/lib/carbon/test/gen/ARoutingGroups.h b/mcrouter/lib/carbon/test/gen/ARoutingGroups.h new file mode 100644 index 000000000..222136906 --- /dev/null +++ b/mcrouter/lib/carbon/test/gen/ARoutingGroups.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. + * + */ + +/* + * THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN + * VAIN. + * + * @generated + */ +#pragma once + +#include + +#include "mcrouter/lib/carbon/test/gen/AMessages.h" + +namespace carbon { + +// ArithmeticLike +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +// DeleteLike +template <> +struct DeleteLike { + static const bool value = false; +}; + +// GetLike +template <> +struct GetLike { + static const bool value = false; +}; + +// UpdateLike +template <> +struct UpdateLike { + static const bool value = false; +}; +} // namespace carbon diff --git a/mcrouter/lib/carbon/test/gen/BRouterInfo.h b/mcrouter/lib/carbon/test/gen/BRouterInfo.h index 81387bc59..53b8070f6 100644 --- a/mcrouter/lib/carbon/test/gen/BRouterInfo.h +++ b/mcrouter/lib/carbon/test/gen/BRouterInfo.h @@ -24,6 +24,7 @@ #include "mcrouter/lib/carbon/test/gen/BRouteHandleIf.h" #include "mcrouter/lib/carbon/test/gen/BRouterStats.h" +#include "mcrouter/lib/carbon/test/gen/BRoutingGroups.h" // Forward declarations namespace folly { diff --git a/mcrouter/lib/carbon/test/gen/BRoutingGroups.h b/mcrouter/lib/carbon/test/gen/BRoutingGroups.h new file mode 100644 index 000000000..1b16d2eca --- /dev/null +++ b/mcrouter/lib/carbon/test/gen/BRoutingGroups.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. + * + */ + +/* + * THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN + * VAIN. + * + * @generated + */ +#pragma once + +#include + +#include "mcrouter/lib/carbon/test/gen/BMessages.h" + +namespace carbon { + +// ArithmeticLike +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +// DeleteLike +template <> +struct DeleteLike { + static const bool value = false; +}; + +// GetLike +template <> +struct GetLike { + static const bool value = false; +}; + +// UpdateLike +template <> +struct UpdateLike { + static const bool value = false; +}; +} // namespace carbon diff --git a/mcrouter/lib/carbon/test/gen/CarbonTestRouterInfo.h b/mcrouter/lib/carbon/test/gen/CarbonTestRouterInfo.h index 891c7393f..594fb4746 100644 --- a/mcrouter/lib/carbon/test/gen/CarbonTestRouterInfo.h +++ b/mcrouter/lib/carbon/test/gen/CarbonTestRouterInfo.h @@ -24,6 +24,7 @@ #include "mcrouter/lib/carbon/test/gen/CarbonTestRouteHandleIf.h" #include "mcrouter/lib/carbon/test/gen/CarbonTestRouterStats.h" +#include "mcrouter/lib/carbon/test/gen/CarbonTestRoutingGroups.h" // Forward declarations namespace folly { diff --git a/mcrouter/lib/carbon/test/gen/CarbonTestRoutingGroups.h b/mcrouter/lib/carbon/test/gen/CarbonTestRoutingGroups.h new file mode 100644 index 000000000..4a0ac82e7 --- /dev/null +++ b/mcrouter/lib/carbon/test/gen/CarbonTestRoutingGroups.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. + * + */ + +/* + * THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN + * VAIN. + * + * @generated + */ +#pragma once + +#include + +#include "mcrouter/lib/carbon/test/gen/CarbonTestMessages.h" + +namespace carbon { + +// ArithmeticLike +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +// DeleteLike +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +// GetLike +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +// UpdateLike +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; +} // namespace carbon diff --git a/mcrouter/lib/carbon/test/gen/CarbonThriftTestRouterInfo.h b/mcrouter/lib/carbon/test/gen/CarbonThriftTestRouterInfo.h index 71d49a208..6b0bd6bf4 100644 --- a/mcrouter/lib/carbon/test/gen/CarbonThriftTestRouterInfo.h +++ b/mcrouter/lib/carbon/test/gen/CarbonThriftTestRouterInfo.h @@ -24,6 +24,7 @@ #include "mcrouter/lib/carbon/test/gen/CarbonThriftTestRouteHandleIf.h" #include "mcrouter/lib/carbon/test/gen/CarbonThriftTestRouterStats.h" +#include "mcrouter/lib/carbon/test/gen/CarbonThriftTestRoutingGroups.h" // Forward declarations namespace folly { diff --git a/mcrouter/lib/carbon/test/gen/CarbonThriftTestRoutingGroups.h b/mcrouter/lib/carbon/test/gen/CarbonThriftTestRoutingGroups.h new file mode 100644 index 000000000..ab58a5601 --- /dev/null +++ b/mcrouter/lib/carbon/test/gen/CarbonThriftTestRoutingGroups.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. + * + */ + +/* + * THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN + * VAIN. + * + * @generated + */ +#pragma once + +#include + +#include "mcrouter/lib/carbon/test/gen/CarbonThriftTestMessages.h" + +namespace carbon { + +// ArithmeticLike +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +// DeleteLike +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +// GetLike +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +// UpdateLike +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; +} // namespace carbon diff --git a/mcrouter/lib/network/Memcache.idl b/mcrouter/lib/network/Memcache.idl index 6993df415..1ca411aa3 100644 --- a/mcrouter/lib/network/Memcache.idl +++ b/mcrouter/lib/network/Memcache.idl @@ -527,6 +527,16 @@ service { arithmetic: [ McIncrRequest, McDecrRequest + ], + no_group: [ + McExecRequest, + McFlushAllRequest, + McFlushReRequest, + McQuitRequest, + McShutdownRequest, + McStatsRequest, + McTouchRequest, + McVersionRequest, ] }; gen_client_tool: true; diff --git a/mcrouter/lib/network/gen/MemcacheRoutingGroups.h b/mcrouter/lib/network/gen/MemcacheRoutingGroups.h index e56843b78..31d56eaf0 100644 --- a/mcrouter/lib/network/gen/MemcacheRoutingGroups.h +++ b/mcrouter/lib/network/gen/MemcacheRoutingGroups.h @@ -21,26 +21,291 @@ namespace carbon { // ArithmeticLike +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + template <> struct ArithmeticLike { static const bool value = true; typedef void* Type; }; +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + template <> struct ArithmeticLike { static const bool value = true; typedef void* Type; }; +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + +template <> +struct ArithmeticLike { + static const bool value = false; +}; + // DeleteLike +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + template <> struct DeleteLike { static const bool value = true; typedef void* Type; }; +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + +template <> +struct DeleteLike { + static const bool value = false; +}; + // GetLike +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + template <> struct GetLike { static const bool value = true; @@ -65,18 +330,68 @@ struct GetLike { typedef void* Type; }; +template <> +struct GetLike { + static const bool value = false; +}; + template <> struct GetLike { static const bool value = true; typedef void* Type; }; +template <> +struct GetLike { + static const bool value = false; +}; + template <> struct GetLike { static const bool value = true; typedef void* Type; }; +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + +template <> +struct GetLike { + static const bool value = false; +}; + // UpdateLike template <> struct UpdateLike { @@ -96,18 +411,83 @@ struct UpdateLike { typedef void* Type; }; +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + template <> struct UpdateLike { static const bool value = true; typedef void* Type; }; +template <> +struct UpdateLike { + static const bool value = false; +}; + template <> struct UpdateLike { static const bool value = true; typedef void* Type; }; +template <> +struct UpdateLike { + static const bool value = false; +}; + template <> struct UpdateLike { static const bool value = true; @@ -119,4 +499,24 @@ struct UpdateLike { static const bool value = true; typedef void* Type; }; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; + +template <> +struct UpdateLike { + static const bool value = false; +}; } // namespace carbon diff --git a/mcrouter/lib/network/test/AsyncMcServerShutdownTest.cpp b/mcrouter/lib/network/test/AsyncMcServerShutdownTest.cpp index 8d039d0e2..91c3d2f07 100644 --- a/mcrouter/lib/network/test/AsyncMcServerShutdownTest.cpp +++ b/mcrouter/lib/network/test/AsyncMcServerShutdownTest.cpp @@ -10,6 +10,7 @@ #include #include +#include "mcrouter/lib/carbon/example/gen/HelloGoodbyeRoutingGroups.h" #include "mcrouter/lib/carbon/example/gen/HelloGoodbyeServer.h" #include "mcrouter/lib/network/AsyncMcClient.h" #include "mcrouter/lib/network/AsyncMcServer.h"