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

Enhance comment about MonotonicTime #8011

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion api/envoy/api/v2/cds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ message Cluster {
// the first update happens. This is useful for big clusters, with potentially noisy deploys
// that might trigger excessive CPU usage due to a constant stream of healthcheck state changes
// or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new
// cluster).
// cluster). Please always keep in mind that the use of sandbox technologies may change this
// behavior.
//
// If this is not set, we default to a merge window of 1000ms. To disable it, set the merge
// window to 0.
Expand Down
10 changes: 7 additions & 3 deletions source/common/upstream/cluster_manager_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,13 @@ class ClusterManagerImpl : public ClusterManager, Logger::Loggable<Logger::Id::u
// This is default constructed to the clock's epoch:
// https://en.cppreference.com/w/cpp/chrono/time_point/time_point
//
// This will usually be the computer's boot time, which means that given a not very large
// `Cluster.CommonLbConfig.update_merge_window`, the first update will trigger immediately
// (the expected behavior).
// Depending on your execution environment this value can be different.
// When running as host process: This will usually be the computer's boot time, which means that
// given a not very large `Cluster.CommonLbConfig.update_merge_window`, the first update will
// trigger immediately (the expected behavior). When running in some sandboxed environment this
// value can be set to the start time of the sandbox, which means that the delta calculated
// between now and the start time may fall within the
// `Cluster.CommonLbConfig.update_merge_window`, with the side effect to delay the first update.
MonotonicTime last_updated_;
};

Expand Down