Skip to content
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

add duration logging to flushImpl and to waiting for prev flushes #2057

Closed
wants to merge 1 commit into from

Conversation

Frederik-Baetens
Copy link
Contributor

This attempts to differentiate single flushes taking a long time vs the effect of multiple queued flushes causing issues.

flushScheduledWithOutputGate = false;
})).then([this]() {
auto flushPromise = lastFlush.addBranch().attach(
util::DurationExceededLogger(
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this works. Own<T> has an attachVal that would work like this, but kj::Promise doesn't have an attachVal. Maybe you can just heap allocate it and then move it here.

auto durationAlert = util::DurationExceededLogger(
clock,
5 * kj::SECONDS,
"flushImpl took longer than expected"
Copy link
Member

Choose a reason for hiding this comment

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

This would be much more useful if it included some summary of the operations included in the flush. Or if it allowed us to distinguish between the actual flushing being slow and the waitForPastReads step being slow.

@Frederik-Baetens
Copy link
Contributor Author

Closing this too, seems like most slowness here is usually driven by cpu usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants