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

MINOR: improve StreamThread periodic processing log #18430

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Jan 8, 2025

The current log is really helpful, this PR adds a bit more information to that log to help debug some issues. In particular, it is interesting to be able to debug situations that have long intervals between polls. It also includes a reference to how long it has been since it last logged so you don't have to find the previous time it was logged to compute quick per-second ratios.

@github-actions github-actions bot added triage PRs from the community streams small Small PRs labels Jan 8, 2025
totalRecordsProcessedSinceLastSummary, totalPunctuatorsSinceLastSummary, totalCommittedSinceLastSummary);
final long timeSinceLastLog = now - lastLogSummaryMs;
if (logSummaryIntervalMs > 0 && timeSinceLastLog > logSummaryIntervalMs) {
log.info("Processed {} total records, ran {} punctuators, polled {} times and committed {} total tasks since the last update {}ms ago",
Copy link
Member

Choose a reason for hiding this comment

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

oxford comma 😭

Copy link
Member

Choose a reason for hiding this comment

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

can we also log how long it's been since the last update? we just merged a KIP to allow configuring this interval, and anyways the time can vary and the logging interval is just a minimum not exact interval

Copy link
Member

Choose a reason for hiding this comment

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

oh my bad...you already did...

(great minds think alike...?)

Copy link
Member

@ableegoldman ableegoldman left a comment

Choose a reason for hiding this comment

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

LGTM! This will be super helpful

@github-actions github-actions bot removed the triage PRs from the community label Jan 9, 2025
@ableegoldman ableegoldman merged commit 2a0c31e into apache:trunk Jan 9, 2025
10 checks passed
@ableegoldman
Copy link
Member

Merged to trunk and cherrypicked to 4.0

ableegoldman pushed a commit that referenced this pull request Jan 9, 2025
The current log is really helpful, this PR adds a bit more information to that log to help debug some issues. In particular, it is interesting to be able to debug situations that have long intervals between polls. It also includes a reference to how long it has been since it last logged so you don't have to find the previous time it was logged to compute quick per-second ratios.

Reviewers: Anna Sophie Blee-Goldman <[email protected]>
@ableegoldman
Copy link
Member

Cherrypicked to 3.9 as well

ableegoldman pushed a commit that referenced this pull request Jan 9, 2025
The current log is really helpful, this PR adds a bit more information to that log to help debug some issues. In particular, it is interesting to be able to debug situations that have long intervals between polls. It also includes a reference to how long it has been since it last logged so you don't have to find the previous time it was logged to compute quick per-second ratios.

Reviewers: Anna Sophie Blee-Goldman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants