Skip to content

Commit

Permalink
Add rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed Feb 25, 2025
1 parent 5c8051e commit 373ab07
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions trino-lb/src/maintenance/query_count_fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ impl QueryCountFetcher {
}
}

/// Update the query counter for the given cluster.
///
/// In case the cluster should be reachable, we fetch the current counter and store that.
/// In case we know there is no point in fetching the counter (as e.g. the cluster is turned off), we store a query
/// count of zero (0) to avoid having dangling clusters with non-zero query counts (when in fact they are not
/// executing any query at all).
#[instrument(skip(self, cluster), fields(cluster_name = cluster.name))]
async fn process_cluster(&self, cluster: &TrinoClusterConfig, state: ClusterState) {
match state {
Expand Down

0 comments on commit 373ab07

Please sign in to comment.