[ 
https://issues.apache.org/jira/browse/TS-4612?focusedWorklogId=25951&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25951
 ]

ASF GitHub Bot logged work on TS-4612:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Jul/16 13:09
            Start Date: 23/Jul/16 13:09
    Worklog Time Spent: 10m 
      Work Description: Github user oknet commented on the issue:

    https://github.com/apache/trafficserver/pull/771
  
    @bryancall I'm found open_list also used in Cluster.
    
    file: iocore/cluster/ClusterHandlerBase.cc
    ```
    1007     case ClusterHandler::CLCON_CONN_BIND_CLEAR: {
    1008       UnixNetVConnection *vc = (UnixNetVConnection *)net_vc;
    1009       MUTEX_TRY_LOCK(lock, vc->nh->mutex, e->ethread);
    1010       MUTEX_TRY_LOCK(lock1, vc->mutex, e->ethread);
    1011       if (lock.is_locked() && lock1.is_locked()) {
    1012         vc->ep.stop();
    1013         vc->nh->open_list.remove(vc);
    1014         vc->thread = NULL;
    1015         if (vc->nh->read_ready_list.in(vc))
    1016           vc->nh->read_ready_list.remove(vc);
    1017         if (vc->nh->write_ready_list.in(vc))
    1018           vc->nh->write_ready_list.remove(vc);
    1019         if (vc->read.in_enabled_list)
    1020           vc->nh->read_enable_list.remove(vc);
    1021         if (vc->write.in_enabled_list)
    1022           vc->nh->write_enable_list.remove(vc);
    1023 
    1024         // CLCON_CONN_BIND handle in bind vc->thread (bind thread nh)
    1025         cluster_connect_state = ClusterHandler::CLCON_CONN_BIND;
    1026         thread->schedule_in(this, CLUSTER_PERIOD);
    1027         return EVENT_DONE;
    1028       } else {
    1029         // CLCON_CONN_BIND_CLEAR handle in origin vc->thread (origin 
thread nh)
    1030         vc->thread->schedule_in(this, CLUSTER_PERIOD);
    1031         return EVENT_DONE;
    1032       }
    1033     }
    ```
    
    Is there have InactivityCop for Cluster? I am not familiar with the cluster.
    I'm should add "vc->nh->cop_list.remove(vc);" after Line 1013 if yes.


Issue Time Tracking
-------------------

    Worklog Id:     (was: 25951)
    Time Spent: 2h 50m  (was: 2h 40m)

> Proposal: InactivityCop Optimize
> --------------------------------
>
>                 Key: TS-4612
>                 URL: https://issues.apache.org/jira/browse/TS-4612
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core, Network
>            Reporter: Oknet Xu
>             Fix For: sometime
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> By review the processing of InactivityCop::check_inactivity():
> 1. get all local vc from open_list
> 2. put them into cop_list
> 3. check every vc in cop_list if it is already timeouted
> 4. callback vc->handleEvent to close vc if it is timeout
> InactivityCop and NetHandler share one mutex.
> InactivityCop runs every second, NetHandler runs every 10ms, that means 
> Nethandler runs 100 times until next InactivityCop runs.
> if one vc has read/write in a Nethandler call, it is won't be timeout in the 
> next InactivityCop run.
> Thus, if the vc has read/write in Nethandler, we move it out of cop-list then 
> the InactivityCop runs would get better performace.



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

Reply via email to