Skip to content
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
7223128
initial commit
fredlas Feb 11, 2019
520e353
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Feb 11, 2019
88238ea
add note to version_history about the hot-restart-breaking changes
fredlas Feb 12, 2019
343ecaf
replace hot restart RPC proto with a protobuf-based one
fredlas Feb 13, 2019
676cbfb
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Feb 13, 2019
fd5187f
rearrange version_history list
fredlas Feb 13, 2019
cdf7eeb
rearrange version_history list again
fredlas Feb 13, 2019
ba050ff
remove not yet necessary SimpleMetric additions
fredlas Feb 13, 2019
4cc2c5d
address comments
fredlas Feb 14, 2019
2d478b2
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Feb 14, 2019
c6f2570
remove now unused resizeRecvBuf
fredlas Feb 14, 2019
4dcb47f
expected type helper cleanup
fredlas Feb 15, 2019
062dc24
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Feb 15, 2019
49ac058
make sendmsg always blocking
fredlas Feb 15, 2019
7176243
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Feb 15, 2019
9ab728e
initial work on stat combining logic, about to rip out shmem
fredlas Mar 4, 2019
0a2dd3a
initial apparently working version of stats not in shared memory
fredlas Mar 7, 2019
453fe6b
resolve merge
fredlas Mar 7, 2019
311bd4b
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Mar 7, 2019
1e1adbb
fix proto BUILD file
fredlas Mar 7, 2019
ac8324a
add basic unit test for combining logic
fredlas Mar 7, 2019
034c362
clean up comments, add basic unit test
fredlas Mar 7, 2019
14f0b4b
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Mar 7, 2019
ff2df39
added boolIndicator support, more testing
fredlas Mar 7, 2019
bd5a88b
remove max_stats shared memory limit
fredlas Mar 7, 2019
2fa39cd
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Mar 7, 2019
2906b9b
restore max-stats flag
fredlas Mar 18, 2019
73e3217
remove bool indicator stat combination
fredlas Mar 18, 2019
d4151f3
resolve conflict
fredlas Mar 18, 2019
9c63bf4
remove boolIndicator support, add all necessary combination logic exc…
fredlas Mar 18, 2019
d24f0d1
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Mar 18, 2019
ece40e6
bring max_stats field back into proto
fredlas Mar 27, 2019
3e064c9
resolve merge conflict
fredlas Mar 27, 2019
3a1911c
add words to dictionary
fredlas Mar 27, 2019
7233a5c
docs can no longer have max-stats tagged as an option
fredlas Mar 27, 2019
70445f0
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 5, 2019
982f4b4
move release notes to 1.11.0
fredlas Apr 5, 2019
683e523
Kick CI
fredlas Apr 8, 2019
708e0a3
address simple comments and merge master
fredlas Apr 12, 2019
c5a92fa
address simple comments and merge master conflict
fredlas Apr 12, 2019
f1bf534
hot restart no longer uses envoy.admin.v2alpha.SimpleMetric proto
fredlas Apr 15, 2019
1582531
break stat merging logic out into its own class
fredlas Apr 15, 2019
ae9998d
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 15, 2019
9133ff6
address comments, remove many uses of StatsOptions
fredlas Apr 16, 2019
2e07d8a
add TODOs
fredlas Apr 16, 2019
ee94b33
remove BooleanOr
fredlas Apr 17, 2019
072e086
switch combination logic exceptions to regex
fredlas Apr 17, 2019
0042aea
remove StatsOptions and max-obj-name-length
fredlas Apr 17, 2019
1e0052c
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 17, 2019
84cbb15
docs cleanup
fredlas Apr 18, 2019
c883fb5
add comments to merge logic exceptions
fredlas Apr 18, 2019
c50b1f4
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 18, 2019
bc6791f
bring test in line with changes i just made
fredlas Apr 18, 2019
cd7858d
add note about combine logic
fredlas Apr 18, 2019
86b3594
refactor server usage of hot restart
fredlas Apr 18, 2019
ab00d3a
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 18, 2019
b833808
delete RawStatData and BlockMemoryHashSet
fredlas Apr 18, 2019
0ff2ba9
remove requiresBoundedStatNameSize
fredlas Apr 18, 2019
5ca818a
remove unused raw_stat_data_test
fredlas Apr 18, 2019
6ec5536
fix test
fredlas Apr 18, 2019
191fdee
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 18, 2019
9b4b5c3
further cleanup and deletion
fredlas Apr 19, 2019
fbaa76f
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 19, 2019
4760aa9
fix weird TSAN failure
fredlas Apr 19, 2019
a967a1c
minor refactor of StatMerger anticipating all-gauges-logic verification
fredlas Apr 19, 2019
5fd8b77
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 19, 2019
07f6821
add verifyCombineLogicSpecified TODO
fredlas Apr 19, 2019
344ecef
apply some comments
fredlas Apr 23, 2019
bb8e14a
resolve merge conflict
fredlas Apr 23, 2019
8f6d830
first counter value shouldnt increment
fredlas Apr 24, 2019
7500f41
rename unix seconds
fredlas Apr 24, 2019
68e7a52
ConstCharStarHashMap
fredlas Apr 24, 2019
a0f5d47
comments
fredlas Apr 24, 2019
98bcdf2
fix test
fredlas Apr 24, 2019
e8c2dc8
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 24, 2019
95a8f65
separate out counter values from deltas
fredlas Apr 25, 2019
4c01657
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 25, 2019
2256fdc
stop sending whole counter value, cache combine logic
fredlas Apr 25, 2019
e2b0380
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 25, 2019
1f1dc51
fix uses of things i removed
fredlas Apr 25, 2019
6cc31a1
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 25, 2019
ed5d2bd
fix uses of things i removed
fredlas Apr 25, 2019
4fb5ce1
merge stats symbol table
fredlas Apr 26, 2019
2156168
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 26, 2019
20b2217
change static map to pointer
fredlas Apr 26, 2019
c90c713
add comment
fredlas Apr 26, 2019
88726c2
remove only import when unused logic option
fredlas Apr 29, 2019
e521b15
replace CombineLogic enum with bool
fredlas Apr 29, 2019
5b2b05e
remove accidental temp file
fredlas Apr 29, 2019
6019303
added TODO, and dont send 0 delta counters
fredlas Apr 29, 2019
b5f9a44
resolve conflict
fredlas Apr 29, 2019
4d7c740
add TODO
fredlas Apr 29, 2019
27b7d3f
hot restart parent tests
fredlas Apr 29, 2019
96fc99c
rename combineLogic to shouldImport
fredlas Apr 29, 2019
79b0eec
revert ConstCharStarHashMap and address comments
fredlas Apr 30, 2019
3d133c7
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 30, 2019
7228b85
unrevert, but now to StatNameHashMap
fredlas Apr 30, 2019
399033a
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas Apr 30, 2019
3521042
update BUILD
fredlas Apr 30, 2019
5eebdaa
enhance a StatMerger test
fredlas Apr 30, 2019
50bb3b8
Merge remote-tracking branch 'upstream/master' into RPC_non_recvmg_rpc
fredlas May 1, 2019
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
1 change: 1 addition & 0 deletions api/envoy/admin/v2alpha/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ message SimpleMetric {
enum Type {
COUNTER = 0;
GAUGE = 1;
BOOL_INDICATOR = 2;
Comment thread
fredlas marked this conversation as resolved.
Outdated
Comment thread
fredlas marked this conversation as resolved.
Outdated
}

// Type of the metric represented.
Expand Down
2 changes: 1 addition & 1 deletion api/envoy/admin/v2alpha/server_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ message CommandLineOptions {
// See :option:`--mode` for details.
Mode mode = 19;

// See :option:`--max-stats` for details.
// Obsolete; do not use.
uint64 max_stats = 20;
Comment thread
fredlas marked this conversation as resolved.
Outdated

// See :option:`--max-obj-name-len` for details.
Comment thread
fredlas marked this conversation as resolved.
Outdated
Expand Down
6 changes: 6 additions & 0 deletions api/envoy/api/v2/core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ api_go_proto_library(
deps = [":base_go_proto"],
)

api_proto_library_internal(
name = "hot_restart",
srcs = ["hot_restart.proto"],
deps = ["//envoy/admin/v2alpha:metrics"],
)

api_proto_library_internal(
name = "protocol",
srcs = ["protocol.proto"],
Expand Down
67 changes: 67 additions & 0 deletions api/envoy/api/v2/core/hot_restart.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
syntax = "proto3";
Comment thread
fredlas marked this conversation as resolved.

package envoy.api.v2.core;

option java_outer_classname = "HotRestartProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.api.v2.core";

import "envoy/admin/v2alpha/metrics.proto";

message HotRestartMessage {
// Child->parent requests
message Request {
message PassListenSocket {
string address = 1;
}
message ShutdownAdmin {
}
message Stats {
}
message DrainListeners {
}
message Terminate {
}
oneof request {
PassListenSocket pass_listen_socket = 1;
ShutdownAdmin shutdown_admin = 2;
Stats stats = 3;
DrainListeners drain_listeners = 4;
Terminate terminate = 5;
}
}

// Parent->child replies
message Reply {
message PassListenSocket {
int32 fd = 1;
}
message ShutdownAdmin {
uint64 original_start_time = 1;
}
message Stats {
// Values for server_stats, which don't fit with the "combination logic" approach.
uint64 memory_allocated = 1;
uint64 num_connections = 2;

// The parent's current values for various stats in its stats store.
repeated envoy.admin.v2alpha.SimpleMetric counters = 3;
repeated envoy.admin.v2alpha.SimpleMetric gauges = 4;
}
oneof reply {
// When this oneof is of the PassListenSocketReply type, there is a special
// implied meaning: the recvmsg that got this proto has control data to make
// the passing of the fd work, so make use of CMSG_SPACE etc.
PassListenSocket pass_listen_socket = 1;
ShutdownAdmin shutdown_admin = 2;
Stats stats = 3;
}
}

oneof requestreply {
Request request = 1;
Reply reply = 2;
}

bool didnt_recognize_your_last_message = 3;
}
7 changes: 6 additions & 1 deletion docs/root/intro/version_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Version history

1.11.0 (Pending)
================
* hot restart: stats are no longer shared between hot restart parent/child via shared memory, but rather by RPC.
Comment thread
fredlas marked this conversation as resolved.
Outdated
* server: changed protocol that hot restart children/parents use; now protobuf based.
Comment thread
fredlas marked this conversation as resolved.
Outdated
* server: stats are now preserved across hot restart by being explicitly communicated through the hot
restart protocol, rather than living in shared memory.
* server: hot restart version incremented to 11.
Comment thread
fredlas marked this conversation as resolved.
Outdated

1.10.0 (Apr 5, 2019)
====================
Expand Down Expand Up @@ -615,7 +620,7 @@ Version history
* runtime: added :ref:`comment capability <config_runtime_comments>`.
* server: change default log level (:option:`-l`) to `info`.
* stats: maximum stat/name sizes and maximum number of stats are now variable via the
:option:`--max-obj-name-len` and :option:`--max-stats` options.
:option:`--max-obj-name-len` and `--max-stats` options.
* tcp proxy: added :ref:`access logging <envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.access_log>`.
* tcp proxy: added :ref:`configurable connect retries
<envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.max_connect_attempts>`.
Expand Down
1 change: 0 additions & 1 deletion docs/root/operations/admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ modify different aspects of the server:
"service_node": "",
"service_zone": "",
"mode": "Serve",
"max_stats": "16384",
"max_obj_name_len": "60",
Comment thread
fredlas marked this conversation as resolved.
Outdated
"disable_hot_restart": false,
"enable_mutex_tracing": false,
Expand Down
6 changes: 0 additions & 6 deletions docs/root/operations/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,6 @@ following are the command line options that Envoy supports.
option set to a non default value, you should use the same option (and same value) for subsequent hot
restarts.

.. option:: --max-stats <uint64_t>
Comment thread
mattklein123 marked this conversation as resolved.
Comment thread
fredlas marked this conversation as resolved.

*(optional)* The maximum number of stats that can be shared between hot-restarts. This setting
affects the output of :option:`--hot-restart-version`; the same value must be used to hot
restart. Defaults to 16384. It's not valid to set this larger than 100 million.

.. option:: --disable-hot-restart

*(optional)* This flag disables Envoy hot restart for builds that have it enabled. By default, hot
Expand Down
1 change: 1 addition & 0 deletions include/envoy/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ envoy_cc_library(
"//include/envoy/thread_local:thread_local_interface",
"//include/envoy/tracing:http_tracer_interface",
"//include/envoy/upstream:cluster_manager_interface",
"@envoy_api//envoy/api/v2/core:hot_restart_cc",
],
)

Expand Down
29 changes: 18 additions & 11 deletions include/envoy/server/hot_restart.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
#include <cstdint>
#include <string>

#include "envoy/api/v2/core/hot_restart.pb.h"
#include "envoy/common/pure.h"
#include "envoy/event/dispatcher.h"
#include "envoy/stats/stat_data_allocator.h"
#include "envoy/stats/store.h"
#include "envoy/thread/thread.h"

namespace Envoy {
Expand All @@ -20,11 +22,6 @@ class Instance;
*/
class HotRestart {
Comment thread
fredlas marked this conversation as resolved.
public:
struct GetParentStatsInfo {
uint64_t memory_allocated_;
uint64_t num_connections_;
};

struct ShutdownParentAdminInfo {
time_t original_start_time_;
};
Expand All @@ -49,12 +46,12 @@ class HotRestart {
* Retrieve stats from our parent process.
* @param info will be filled with information from our parent if it can be retrieved.
*/
virtual void getParentStats(GetParentStatsInfo& info) PURE;
virtual std::unique_ptr<envoy::api::v2::core::HotRestartMessage> getParentStats() PURE;

/**
* Initialize the restarter after primary server initialization begins. The hot restart
* implementation needs to be created early to deal with shared memory, logging, etc. so
* late initialization of needed interfaces is done here.
* Initialize the parent logic of our restarter. Meant to be called after initialization of a
* new child has begun. The hot restart implementation needs to be created early to deal with
* shared memory, logging, etc. so late initialization of needed interfaces is done here.
*/
virtual void initialize(Event::Dispatcher& dispatcher, Server::Instance& server) PURE;

Expand All @@ -66,12 +63,22 @@ class HotRestart {
virtual void shutdownParentAdmin(ShutdownParentAdminInfo& info) PURE;

/**
* Tell our parent to gracefully terminate itself.
* Tell our parent process to gracefully terminate itself.
*/
virtual void terminateParent() PURE;

/**
* Shutdown the hot restarter.
* Merge stats_proto into stats_store, taking into account the stats values we've already
* seen transferred.
* @param stats_store the store whose stats will be updated.
* @param stats_proto the stats values we are updating with.
*/
virtual void
mergeParentStats(Stats::StoreRoot& stats_store,
Comment thread
fredlas marked this conversation as resolved.
Outdated
const envoy::api::v2::core::HotRestartMessage::Reply::Stats& stats_proto) PURE;

/**
* Shutdown the half of our hot restarter that acts as a parent.
*/
virtual void shutdown() PURE;

Expand Down
7 changes: 1 addition & 6 deletions include/envoy/server/instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "envoy/access_log/access_log.h"
#include "envoy/api/api.h"
#include "envoy/api/v2/core/hot_restart.pb.h"
#include "envoy/common/mutex_tracer.h"
#include "envoy/event/timer.h"
#include "envoy/http/context.h"
Expand Down Expand Up @@ -87,12 +88,6 @@ class Instance {
*/
virtual void failHealthcheck(bool fail) PURE;

/**
* Fetch server stats specific to this process vs. global shared stats in a hot restart scenario.
* @param info supplies the stats structure to fill.
*/
virtual void getParentStats(HotRestart::GetParentStatsInfo& info) PURE;

/**
* @return whether external healthchecks are currently failed or not.
*/
Expand Down
5 changes: 0 additions & 5 deletions include/envoy/server/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ class Options {
*/
virtual const std::string& serviceZone() const PURE;

/**
* @return uint64_t the maximum number of stats gauges and counters.
*/
virtual uint64_t maxStats() const PURE;

/**
* @return StatsOptions& the max stat name / suffix lengths for stats.
* router/cluster/listener.
Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/thread_local_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class TlsScope : public Scope {

/**
* Store implementation with thread local caching. For design details see
* https://github.com/envoyproxy/envoy/blob/master/docs/stats.md
* https://github.com/envoyproxy/envoy/blob/master/source/docs/stats.md
*/
class ThreadLocalStoreImpl : Logger::Loggable<Logger::Id::stats>, public StoreRoot {
public:
Expand Down
32 changes: 4 additions & 28 deletions source/docs/stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,9 @@ binary program restarts. The metrics are tracked as:
data accumulates. Unliked counters and gauges, histogram data is not retained across
binary program restarts.

## Hot-restart: `RawStatData` vs `HeapStatData`

In order to support restarting the Envoy binary program without losing counter and gauge
values, they are stored in a shared-memory block, including stats that are
created dynamically at runtime in response to discovery of new clusters at
runtime. To simplify memory management, each stat is allocated a fixed amount
of storage, controlled via [command-line
flags](https://www.envoyproxy.io/docs/envoy/latest/operations/cli):
`--max-stats` and `--max-obj-name-len`, which determine the size of the pre-allocated
shared-memory block. See
[RawStatData](https://github.com/envoyproxy/envoy/blob/master/source/common/stats/raw_stat_data.h).

Note in particular that the full stat name is retained in shared-memory, making
it easy to correlate stats across restarts even as the dynamic cluster
configuration changes.

One challenge with this fixed memory allocation strategy is that it limits
cluster scalability. A deployment wishing to use a single Envoy instance to
manage tens of thousands of clusters, each with its own set of scoped stats,
will use more memory than is ideal.

A flag `--disable-hot-restart` pivots the system toward an alternate heap-based
stat allocator that allocates stats on demand in the heap, with no preset limits
on the number of stats or their length. See
[HeapStatData](https://github.com/envoyproxy/envoy/blob/master/source/common/stats/heap_stat_data.h).
values, they are passed from parent to child in an RPC protocol.
They were previously held in shared memory, which imposed various restrictions.

## Performance and Thread Local Storage

Expand Down Expand Up @@ -67,10 +45,8 @@ This implementation is complicated so here is a rough overview of the threading
reference the old scope which may be about to be cache flushed.
* Since it's possible to have overlapping scopes, we de-dup stats when counters() or gauges() is
called since these are very uncommon operations.
* Though this implementation is designed to work with a fixed shared memory space, it will fall
back to heap allocated stats if needed. NOTE: In this case, overlapping scopes will not share
the same backing store. This is to keep things simple, it could be done in the future if
needed.
* Overlapping scopes will not share the same backing store. This is to keep things simple,
it could be done in the future if needed.

### Histogram threading model

Expand Down
6 changes: 2 additions & 4 deletions source/exe/main_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,13 @@ MainCommon::MainCommon(int argc, const char* const* argv)
std::make_unique<Runtime::RandomGeneratorImpl>(), platform_impl_.threadFactory(),
platform_impl_.fileSystem()) {}

std::string MainCommon::hotRestartVersion(uint64_t max_num_stats, uint64_t max_stat_name_len,
bool hot_restart_enabled) {
std::string MainCommon::hotRestartVersion(uint64_t max_stat_name_len, bool hot_restart_enabled) {
#ifdef ENVOY_HOT_RESTART
if (hot_restart_enabled) {
return Server::HotRestartImpl::hotRestartVersion(max_num_stats, max_stat_name_len);
return Server::HotRestartImpl::hotRestartVersion(max_stat_name_len);
}
#else
UNREFERENCED_PARAMETER(hot_restart_enabled);
UNREFERENCED_PARAMETER(max_num_stats);
UNREFERENCED_PARAMETER(max_stat_name_len);
#endif
return "disabled";
Expand Down
3 changes: 1 addition & 2 deletions source/exe/main_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ class MainCommon {
base_.adminRequest(path_and_query, method, handler);
}

static std::string hotRestartVersion(uint64_t max_num_stats, uint64_t max_stat_name_len,
bool hot_restart_enabled);
static std::string hotRestartVersion(uint64_t max_stat_name_len, bool hot_restart_enabled);

private:
#ifdef ENVOY_HANDLE_SIGNALS
Expand Down
47 changes: 44 additions & 3 deletions source/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ envoy_cc_library(
)

envoy_cc_library(
name = "hot_restart_lib",
srcs = envoy_select_hot_restart(["hot_restart_impl.cc"]),
hdrs = envoy_select_hot_restart(["hot_restart_impl.h"]),
name = "hot_restarting_base",
srcs = envoy_select_hot_restart(["hot_restarting_base.cc"]),
hdrs = envoy_select_hot_restart(["hot_restarting_base.h"]),
deps = [
"//include/envoy/api:os_sys_calls_interface",
"//include/envoy/event:dispatcher_interface",
Expand All @@ -125,6 +125,47 @@ envoy_cc_library(
"//source/common/network:utility_lib",
"//source/common/stats:raw_stat_data_lib",
"//source/common/stats:stats_options_lib",
"@envoy_api//envoy/api/v2/core:hot_restart_cc",
],
)

envoy_cc_library(
name = "hot_restarting_child",
srcs = envoy_select_hot_restart(["hot_restarting_child.cc"]),
hdrs = envoy_select_hot_restart(["hot_restarting_child.h"]),
deps = [
":hot_restarting_base",
],
)

envoy_cc_library(
name = "hot_restarting_parent",
srcs = envoy_select_hot_restart(["hot_restarting_parent.cc"]),
hdrs = envoy_select_hot_restart(["hot_restarting_parent.h"]),
deps = [
":hot_restarting_base",
"//source/common/memory:stats_lib",
],
)

envoy_cc_library(
name = "hot_restart_lib",
srcs = envoy_select_hot_restart(["hot_restart_impl.cc"]),
hdrs = envoy_select_hot_restart(["hot_restart_impl.h"]),
deps = [
":hot_restarting_child",
":hot_restarting_parent",
"//include/envoy/api:os_sys_calls_interface",
"//include/envoy/event:dispatcher_interface",
"//include/envoy/event:file_event_interface",
"//include/envoy/server:hot_restart_interface",
"//include/envoy/server:instance_interface",
"//include/envoy/server:options_interface",
"//source/common/api:os_sys_calls_lib",
"//source/common/common:assert_lib",
"//source/common/common:block_memory_hash_set_lib",
"//source/common/stats:heap_stat_data_lib",
"//source/common/stats:stats_options_lib",
],
)

Expand Down
1 change: 0 additions & 1 deletion source/server/config_validation/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class ValidationInstance : Logger::Loggable<Logger::Id::main>,
DrainManager& drainManager() override { NOT_IMPLEMENTED_GCOVR_EXCL_LINE; }
AccessLog::AccessLogManager& accessLogManager() override { return access_log_manager_; }
void failHealthcheck(bool) override { NOT_IMPLEMENTED_GCOVR_EXCL_LINE; }
void getParentStats(HotRestart::GetParentStatsInfo&) override { NOT_IMPLEMENTED_GCOVR_EXCL_LINE; }
HotRestart& hotRestart() override { NOT_IMPLEMENTED_GCOVR_EXCL_LINE; }
Init::Manager& initManager() override { return init_manager_; }
ServerLifecycleNotifier& lifecycleNotifier() override { return *this; }
Expand Down
Loading