envoyproxy / envoyproxy/envoy

disable cluster manager stats will block the cds

Open
#28,179 2 comments 0 reactions 0 assignees View on GitHub
area/xds bug no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

If the cluster manager stats is disabled by the `stats_matcher`, the cds subsription will be blocked. Because the `warming_clusters_` stat is used to determine if all warming clusters are complete warming and should resume cds or not.
Disable `warming_clusters_` will result in that the cds will never be resumed after a pause.

```
const bool all_clusters_initialized =
init_helper_.state() == ClusterManagerInitHelper::State::AllClustersInitialized;
if (all_clusters_initialized && ads_mux_) {
const auto type_url = Config::getTypeUrl();
const uint64_t previous_warming = cm_stats_.warming_clusters_.value();
if (previous_warming == 0 && !warming_clusters_.empty()) {
resume_cds_ = ads_mux_->pause(type_url);
} else if (previous_warming > 0 && warming_clusters_.empty()) {
ASSERT(resume_cds_ != nullptr);
resume_cds_.reset();
}
}
cm_stats_.active_clusters_.set(active_clusters_.size());
cm_stats_.warming_clusters_.set(warming_clusters_.size());
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.