Skip to content

Conversation

@wcy-fdu
Copy link
Contributor

@wcy-fdu wcy-fdu commented Feb 25, 2022

What's changed and what's your intention?

PLEASE DO NOT LEAVE THIS EMPTY !!!

Please explain IN DETAIL what the changes are in this PR and why they are needed:

  • Summarize your change (mandatory)
    This PR adds barrier latency monitor, and updates the corresponding grafana dashboards.

  • How does this PR work? Need a brief introduction for the changed logic (optional)

  • Describe clearly one logical change and avoid lazy messages (optional)

  • Describe any limitations of the current code (optional)

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

@github-actions github-actions bot added the type/feature Type: New feature. label Feb 25, 2022
}
lazy_static::lazy_static! {
pub static ref
DEFAULT_META_STATS: Arc<MetaMetrics> = Arc::new(MetaMetrics::new());
Copy link
Contributor

@skyzh skyzh Feb 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use lazy_static in meta metrics. The metrics in meta service is designed to not affect the global scope. We should also later refactor compute node.


/// When `buffer` is not empty anymore, all subscribers of this watcher will be notified.
changed_tx: watch::Sender<()>,
metrics: Arc<MetaMetrics>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should move to BarrierManager.

@wcy-fdu wcy-fdu requested a review from twocode February 25, 2022 07:45
Copy link
Contributor

@skyzh skyzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

let buckets = BARRIER_BUCKETS;
let opts = histogram_opts!(
"meta_barrier_duration_seconds",
"barrier latency ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space?

let opts = histogram_opts!(
"meta_barrier_duration_seconds",
"barrier latency ",
buckets.iter().map(|x| *x * 0.1).collect_vec()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we define BARRIER_BUCKETS manually, do we still need to *0.1 here?

"meta_grpc_duration_seconds",
"gRPC latency of meta services",
buckets.iter().map(|x| *x * 0.1).collect_vec()
buckets.iter().map(|x| *x * 1.0).collect_vec()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove map.


/// gRPC latency of meta services
pub grpc_latency: HistogramVec,
pub barrier_latency: Histogram,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add docstring for this field.

@zehaowei zehaowei merged commit a79395b into main Feb 25, 2022
@zehaowei zehaowei deleted the wcy_add_barrier_monitor branch February 25, 2022 09:02
@twocode
Copy link
Contributor

twocode commented Feb 25, 2022

Suggest attaching a grafana/tracing screenshot within a PR regarding monitoring/metrics. 😄

yezizp2012 pushed a commit that referenced this pull request Feb 28, 2022
* add barrier monitor

* fix

* fix

* x

* x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature Type: New feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants