[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-5072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated ZOOKEEPER-5072:
--------------------------------------
    Labels: client diagnostics java pull-request-available  (was: client 
diagnostics java)

> Add opt-in warning for slow ZooKeeper Java client callbacks
> -----------------------------------------------------------
>
>                 Key: ZOOKEEPER-5072
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-5072
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.10.0
>         Environment: ZooKeeper Java client
>            Reporter: DongNyoung Lee
>            Priority: Major
>              Labels: client, diagnostics, java, pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> h2. Background
> ZooKeeper Java client callbacks are dispatched by a single 
> {{{}EventThread{}}}.
> A slow{{{} Watcher{}}}, {{{}AsyncCallback{}}}, or {{LocalCallback}} can 
> therefore delay subsequent watcher events, asynchronous callbacks, and 
> connection or session state events.
> Operators currently have limited visibility into whether client-side callback 
> execution is contributing to observed delays.
> h2. Proposal
> Add an opt-in, threshold-based {{WARN}} log for slow ZooKeeper client 
> callback execution.
> Proposed configuration:
>  
> {{zookeeper.client.slowCallbackThresholdMs}}
>  * Default value: {{0}} — disabled
>  * Values less than or equal to {{0}} disable callback duration measurement 
> and warning logs.
>  * When enabled, the client logs a {{WARN}} when callback execution time 
> exceeds the configured threshold.
>  * Callback duration should be measured using a monotonic clock.
> The diagnostic logging must preserve the existing {{EventThread}} dispatch 
> model. It must not change callback ordering, callback threading, queue 
> structures, or exception-handling behavior.
> h2. Non-goals
>  * Changing the callback executor
>  * Changing callback dispatch behavior
>  * Changing callback ordering
>  * Measuring queued dispatch delay
>  * Modifying queue structures
>  * Adding log rate limiting in the initial implementation



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to