You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "merlimat (via GitHub)" <gi...@apache.org> on 2026/04/28 18:43:18 UTC

[PR] BP-69: Inherit LedgerHandle logger context in ledger operations [bookkeeper]

merlimat opened a new pull request, #4767:
URL: https://github.com/apache/bookkeeper/pull/4767

   ## Summary
   
   - Operations created within the context of a `LedgerHandle` (PendingAddOp, PendingReadOp, BatchedReadOp, ReadOpBase, ForceLedgerOp, TryReadLastConfirmedOp, ReadLastConfirmedAndEntryOp, LedgerRecoveryOp, PendingReadLacOp, PendingWriteLacOp) now inherit the parent ledger's logger context on every emitted event, via `Event.ctx(lh.log)`.
   - Static `@CustomLog` loggers are kept; using per-event `ctx()` rather than constructing a child `Logger` per op avoids per-operation `Logger` allocations while still propagating ledger-scoped attrs (`ledgerId`, etc.) to every log line.
   - `ReadLastConfirmedAndEntryOp` and `LedgerRecoveryOp` previously built an instance-scoped `Logger`; they're switched to the static-logger + `ctx(lh.log)` pattern, removing one `Logger` allocation per operation.
   - Redundant `.attr("ledgerId", ...)` calls — the value is already in `LedgerHandle.log`'s context — are removed at the same sites.
   
   ## Test plan
   
   - [x] `mvn -pl bookkeeper-server compile` passes.
   - [ ] Existing client integration tests continue to pass on CI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] BP-69: Inherit LedgerHandle logger context in ledger operations [bookkeeper]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #4767:
URL: https://github.com/apache/bookkeeper/pull/4767


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org