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

Tsz-wo Sze updated RATIS-2665:
------------------------------
    Component/s: RaftLog

> SegmentedRaftLogWorker close may wait for the task queue poll timeout
> ---------------------------------------------------------------------
>
>                 Key: RATIS-2665
>                 URL: https://issues.apache.org/jira/browse/RATIS-2665
>             Project: Ratis
>          Issue Type: Improvement
>          Components: RaftLog
>    Affects Versions: 3.2.2
>            Reporter: wangqiang
>            Assignee: wangqiang
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> SegmentedRaftLogWorker polls its I/O task queue with a one-second timeout.
> When close() is called while the worker is idle, the worker may still be
> blocked in DataBlockingQueue.poll(). It cannot observe the updated running
> state until the poll returns or times out. Therefore, closing an idle
> SegmentedRaftLogWorker may take up to one second.
> This delay is particularly noticeable when Raft groups are frequently created
> and removed, because each group shutdown may incur the same delay.
> Steps to reproduce:
> 1. Start a SegmentedRaftLog with no pending I/O tasks.
> 2. Wait until SegmentedRaftLogWorker is polling an empty task queue.
> 3. Close the SegmentedRaftLog.
> 4. Measure the close duration.
> The close operation typically takes approximately one second when the worker
> is idle.



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

Reply via email to