You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2023/04/27 17:38:00 UTC

[jira] [Updated] (RATIS-1785) Use SingleThreadExecutor to manage the lifetime of single thread

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

Attila Doroszlai updated RATIS-1785:
------------------------------------
    Fix Version/s: 2.5.0

> Use SingleThreadExecutor to manage the lifetime of single thread
> ----------------------------------------------------------------
>
>                 Key: RATIS-1785
>                 URL: https://issues.apache.org/jira/browse/RATIS-1785
>             Project: Ratis
>          Issue Type: Improvement
>          Components: server
>            Reporter: Xinyu Tan
>            Assignee: Xinyu Tan
>            Priority: Major
>             Fix For: 3.0.0, 2.5.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> While the current SegmentedRaftLogWorker still uses the very primitive Thread management approach of `new Thread`, we can use the more mature approach of `newSingleThreadExecutor` to manage the lifetime of single thread.
> In addition, we also can override all `Executors.newSingleThreadExecutor()`, and gives corresponding thread name only for one thread.
> This work helps to make the code cleaner



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