Skip to content

Log only overridden config in BookieServer startup#4768

Merged
lhotari merged 1 commit into
apache:masterfrom
merlimat:bookie-server-startup-log
May 5, 2026
Merged

Log only overridden config in BookieServer startup#4768
lhotari merged 1 commit into
apache:masterfrom
merlimat:bookie-server-startup-log

Conversation

@merlimat

Copy link
Copy Markdown
Contributor

Summary

  • BookieServer was dumping the entire ServerConfiguration as a formatted JSON blob at startup, which is huge and distracting in logs.
  • Replace it with a single structured Starting Bookie server log entry that carries an overrides attribute containing only the config entries that differ from the built-in defaults.
  • Overrides are computed by iterating the in-memory configuration (properties explicitly set via config file or setProperty) and skipping anything whose value matches a fresh new ServerConfiguration().

Test plan

  • mvn -pl bookkeeper-server compile test-compile passes.
  • Start a bookie with a custom bk_server.conf and confirm the log entry shows only the user-set overrides, not the full config.

Replace the JSON dump of the entire ServerConfiguration with a
"Starting Bookie server" message that carries an "overrides" attribute
holding only the entries that differ from the built-in defaults.

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lhotari lhotari added this to the 4.18.0 milestone May 5, 2026
@lhotari lhotari merged commit 354cc54 into apache:master May 5, 2026
34 of 36 checks passed
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.

3 participants