Skip to content

[fix][broker] Log exception in PulsarMetadataEventSynchronizer failure path#26203

Merged
nodece merged 1 commit into
apache:masterfrom
SongOf:fix/metadata-event-synchronizer-log
Jul 20, 2026
Merged

[fix][broker] Log exception in PulsarMetadataEventSynchronizer failure path#26203
nodece merged 1 commit into
apache:masterfrom
SongOf:fix/metadata-event-synchronizer-log

Conversation

@SongOf

@SongOf SongOf commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Motivation

In PulsarMetadataEventSynchronizer, the message listener has three failure paths (single-listener
exceptionally, multi-listener waitForAll exceptionally, and the surrounding catch block).
All three logged the warning "Failed to synchronize for" without attaching the caught exception,
so when metadata-event synchronization failed there was no stack trace or error cause in the broker
log, making the failure impossible to diagnose. The message text was also truncated/incomplete.

Modifications

  • Attach the caught exception to the slog warn call via .exception(ex) / .exception(e) in all
    three failure paths of the metadata-event message listener in PulsarMetadataEventSynchronizer.
  • Fix the incomplete log message: "Failed to synchronize for""Failed to synchronize metadata event".

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

@nodece
nodece merged commit f1650c5 into apache:master Jul 20, 2026
44 checks passed
@nodece nodece added this to the 5.0.0-M2 milestone Jul 20, 2026
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.

4 participants