You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@distributedlog.apache.org by "Liang Xie (JIRA)" <ji...@apache.org> on 2016/12/05 07:45:58 UTC

[jira] [Updated] (DL-84) Reduce HashedWheelTimer instance number

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

Liang Xie updated DL-84:
------------------------
    Description: 
Reading code and finding that we use HashedWheelTimer in OwnershipCache Class, from netty HashedWheelTimer java doc we know:
{quote}
Do not create many instances.
HashedWheelTimer creates a new thread whenever it is instantiated and started. Therefore, you should make sure to create only one instance and share it across your application
{quote}
then i grep the code base and found there're several HashedWheelTimer instantces be created seems. i think the current code could be improved (to reduce the thread num at least?)

  was:
Reading code and finding that we use HashedWheelTimer in OwnershipCache Class, from netty HashedWheelTimer java doc we know:
{quote}
Do not create many instances.
HashedWheelTimer creates a new thread whenever it is instantiated and started. Therefore, you should make sure to create only one instance and share it across your application
{quote}
then i grep the code base and found more than ten HashedWheelTimer instantces be created seems. i think the current code could be improved to reduce the thread num:)



> Reduce HashedWheelTimer instance number
> ---------------------------------------
>
>                 Key: DL-84
>                 URL: https://issues.apache.org/jira/browse/DL-84
>             Project: DistributedLog
>          Issue Type: Improvement
>          Components: distributedlog-client, distributedlog-core, distributedlog-service
>    Affects Versions: 0.4.0, 0.5.0
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>
> Reading code and finding that we use HashedWheelTimer in OwnershipCache Class, from netty HashedWheelTimer java doc we know:
> {quote}
> Do not create many instances.
> HashedWheelTimer creates a new thread whenever it is instantiated and started. Therefore, you should make sure to create only one instance and share it across your application
> {quote}
> then i grep the code base and found there're several HashedWheelTimer instantces be created seems. i think the current code could be improved (to reduce the thread num at least?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)