-
Notifications
You must be signed in to change notification settings - Fork 598
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
feat(sink): add metrics to monitor sink back pressure #16593
Conversation
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
9425213 | Triggered | Generic Password | 8a36e84 | e2e_test/source/cdc/cdc.validate.postgres.slt | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's similar stuff for monitoring the back-pressure rate of dispatchers, where we simply keep a counter to track the total blocking time accumulated, then visualize the rate
of it over time as the back-pressure rate.
Can we also follow that style, which looks simpler and more consistent?
risingwave/src/stream/src/executor/dispatch.rs
Lines 144 to 149 in 88cfb55
let start_time = Instant::now(); | |
dispatcher.dispatch_barrier(barrier.clone()).await?; | |
dispatcher | |
.actor_output_buffer_blocking_duration_ns | |
.inc_by(start_time.elapsed().as_nanos() as u64); | |
StreamResult::Ok(()) |
It's different. The dispatcher is like monitoring backpressure from the sender side of a channel, but here we only have |
You're right. I meant directly replace |
Do you mean measure and report the two time separately, and reflect
Oh, I get what you mean. Let me have a try. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: William Wen <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Resolve #15473
Sink back-pressure is measured as
total_wait_new_future_time / total_time
, wherewait_new_future_time
means the time between the anext_item
future returns ready and a nextnext_item
future is created.Metrics on grafana. Barrier interval is 1s. We manually inject a sleep in blackhole sink for 200ms, 500ms and 2000ms, and get sink back pressure as 20%, 50% and 100%, which is as expected.
The
truncate
method is unnecessary to be async, and to make the backpressure measurement easier, we maketruncate
method non-async by the way.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.