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

[server] Ingestion Debugging Improvement by making logging more informative. #1347

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haoxu07
Copy link
Contributor

@haoxu07 haoxu07 commented Nov 26, 2024

Summary, imperative, start upper case, don't end with a period

  1. Add consumer topic partition ingestion info logging when consumer is detected as stuck consumer, this will snapshot important information when stuck consumer happen. Normally we need to know which partition with offset lag is attempting to ingest and blocking the thread.
  2. Make hybrid store quota debugging more informative with real-time disk usage in logs.

How was this PR tested?

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

@haoxu07 haoxu07 changed the title [server][WIP] Make disk quota violation more informative. [server][WIP] Ingestion Debugging Improvement by making logging more informative. Nov 27, 2024
@haoxu07 haoxu07 changed the title [server][WIP] Ingestion Debugging Improvement by making logging more informative. [server] Ingestion Debugging Improvement by making logging more informative. Nov 27, 2024
@haoxu07 haoxu07 marked this pull request as ready for review November 27, 2024 19:33
StringBuilder sb = new StringBuilder();
for (Map.Entry<PubSubTopicPartition, TopicPartitionIngestionInfo> entry: topicPartitionIngestionInfoMap
.entrySet()) {
sb.append(entry.getKey().toString()).append(": ").append(entry.getValue().toString()).append("\n");
Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, how big this log could be for a multi-tenant cluster? And how often would this log be printed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is controller by:
(!REDUNDANT_LOGGING_FILTER.isRedundantException(slowestTaskIdString)) {

Once per minute.

Map<PubSubTopicPartition, TopicPartitionIngestionInfo> topicPartitionIngestionInfoMap =
getIngestionInfoFromConsumer(consumer);
// Convert Map of ingestion info for this consumer to String for logging with each partition line by line
StringBuilder sb = new StringBuilder();
Copy link

Choose a reason for hiding this comment

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

Nowaday's JVM can easily optimize string concatenate by simply using a stringBuilder for you. So String concatenation is not a sin anymore.

Not an issue. Just an FYI.

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