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

[improve][broker] Add logs to getInternalStats for quickly locate problem when schema ledger is lost #22233

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

hanmz
Copy link
Contributor

@hanmz hanmz commented Mar 9, 2024

Motivation

If schema ledger is lost, when we call the admin interface "topics stats-internal", the server only has the following error log:
image

However, this log does not clearly indicate which ledger is lost. We don’t even know whether the ledger of topic, cursor or schema is lost. Therefore, it brings challenges to quickly locate the problem.

Modifications

When failed to get ledger metadata for the schema ledger, add logs to quickly locate problem:
log.info("[{}] Failed to get ledger metadata for the schema ledger {}", topic, ledgerId, e);

At this time, we can see the following log, and we can quickly and clearly know that the problem is caused by schema ledger is lost.
image

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 9, 2024
@hanmz hanmz changed the title [improve][broker] Add logs to getInternalStats for quickly locate problem [improve][broker] Add logs to getInternalStats for quickly locate problem when schema ledger is lost Mar 9, 2024
@dao-jun dao-jun merged commit b4f710d into apache:master Mar 11, 2024
51 of 53 checks passed
hanmz added a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants