Skip to content

Commit

Permalink
Added apply_plan counter in the control plane. (#5232)
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton authored Jul 16, 2024
1 parent a3f074e commit c9646f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ impl IndexingScheduler {
notify_on_drop: Option<Arc<NotifyChangeOnDrop>>,
) {
debug!(new_physical_plan=?new_physical_plan, "apply physical indexing plan");
crate::metrics::CONTROL_PLANE_METRICS.apply_total.inc();
for (node_id, indexing_tasks) in new_physical_plan.indexing_tasks_per_indexer() {
// We don't want to block on a slow indexer so we apply this change asynchronously
// TODO not blocking is cool, but we need to make sure there is not accumulation
Expand Down
7 changes: 7 additions & 0 deletions quickwit/quickwit-control-plane/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub struct ControlPlaneMetrics {
pub indexes_total: IntGauge,
pub restart_total: IntCounter,
pub schedule_total: IntCounter,
pub apply_total: IntCounter,
pub metastore_error_aborted: IntCounter,
pub metastore_error_maybe_executed: IntCounter,
pub open_shards_total: IntGaugeVec<1>,
Expand Down Expand Up @@ -73,6 +74,12 @@ impl Default for ControlPlaneMetrics {
"control_plane",
&[],
),
apply_total: new_counter(
"apply_total",
"Number of control plane `apply plan` operations.",
"control_plane",
&[],
),
metastore_error_aborted: new_counter(
"metastore_error_aborted",
"Number of aborted metastore transaction (= do not trigger a control plane \
Expand Down

0 comments on commit c9646f0

Please sign in to comment.