Skip to content

[improve][build] Upgrade slog to 0.10.0 - #26226

Merged
nodece merged 1 commit into
apache:masterfrom
lhotari:lh-slog-0.10.0
Jul 23, 2026
Merged

[improve][build] Upgrade slog to 0.10.0#26226
nodece merged 1 commit into
apache:masterfrom
lhotari:lh-slog-0.10.0

Conversation

@lhotari

@lhotari lhotari commented Jul 22, 2026

Copy link
Copy Markdown
Member

Motivation

slog 0.10.0 is a correctness and performance pass over the logging hot paths, relevant to how Pulsar uses it:

  • Fixes stale-level races in the Log4j2 cached level scheme (generation and effective level packed into a single word, atomic generation bumps)
  • Routes through AsyncLogger in full-async mode (AsyncLoggerContextSelector) instead of calling LoggerConfig directly, which silently ran appender I/O on the application thread
  • Pools log events only when Log4j2 thread-locals are enabled, avoiding cross-contamination of records when AsyncLoggerConfig enqueues events by reference
  • Guards the pooled event against reentrant logging (e.g. an attr supplier that logs)
  • Performance: monotonic clock for timed(), touched-keys-only MDC save/restore in the SLF4J handler, flattened logger context (+14% throughput, −60% allocation on context-bearing events), no per-thread event pooling on virtual threads, interleaved attr array (80 → 64 B/op on the fluent path)

Release notes: https://github.com/merlimat/slog/releases/tag/v0.10.0

Modifications

  • Bump slog from 0.9.9 to 0.10.0 in gradle/libs.versions.toml. This also upgrades the transitive slog 0.9.9 pulled in by bookkeeper-common-allocator 4.18.0 via the platform constraint.
  • Update the bundled jar version in distribution/server/src/assemble/LICENSE.bin.txt and distribution/shell/src/assemble/LICENSE.bin.txt.

No code changes are needed; 0.10.0 has no API changes.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial dependency upgrade without any test coverage. Verified locally with ./gradlew sanityCheck (all modules' main and test sources compile) and checkBinaryLicense for the server and shell distributions.

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

Assisted-by: Claude Code with Fable 5
@lhotari lhotari added this to the 5.0.0-M2 milestone Jul 22, 2026
@nodece
nodece merged commit f51864c into apache:master Jul 23, 2026
43 checks passed
lhotari added a commit that referenced this pull request Jul 23, 2026
lhotari added a commit that referenced this pull request Jul 23, 2026
sandeep-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 31, 2026
sandeep-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 31, 2026
sandeep-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 31, 2026
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Aug 28, 2026
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