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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to