[ 
https://issues.apache.org/jira/browse/TS-4131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15106559#comment-15106559
 ] 

Oknet Xu commented on TS-4131:
------------------------------

sorry, I did not met any issue here.

currently, I'm reading ATS iocore & eventsystem source code and write notes.

I'm read into the InactivityCop in order to understand the different between 
'Inactivity Timeout' and 'Active Timeout'.

I found the InactivityCop broken the 'Active Timeout' feature and create this 
issue here.

before ATS 6.0.0, the timeout implement with an old mechanism that driven by 
eventsystem directly.

from ATS 6.0.0, the old timeout mechanism is disabled and InactivityCop is 
enabled to implement timeout control.

but the InactivityCop only support 'Inactivity Timeout'.

this issue can be ignored if the 'Active Timeout' feature will be droped in the 
feature.

> InactivityCop broken the VC_EVENT_ACTIVE_TIMEOUT
> ------------------------------------------------
>
>                 Key: TS-4131
>                 URL: https://issues.apache.org/jira/browse/TS-4131
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: Oknet Xu
>              Labels: regresion
>
> relative code below:
> {code}
> int
> UnixNetVConnection::mainEvent(int event, Event *e)
> {
>   ink_assert(event == EVENT_IMMEDIATE || event == EVENT_INTERVAL);
>   ink_assert(thread == this_ethread());
> ...
> #ifdef INACTIVITY_TIMEOUT
>   if (e == inactivity_timeout) {
>     signal_event = VC_EVENT_INACTIVITY_TIMEOUT;
>     signal_timeout = &inactivity_timeout;
>   } else {
>     ink_assert(e == active_timeout);
>     signal_event = VC_EVENT_ACTIVE_TIMEOUT;
>     signal_timeout = &active_timeout;
>   }
> #else
>   if (event == EVENT_IMMEDIATE) {
>     /* BZ 49408 */
>     // ink_assert(inactivity_timeout_in);
>     // ink_assert(next_inactivity_timeout_at < ink_get_hrtime());
>     if (!inactivity_timeout_in || next_inactivity_timeout_at > 
> Thread::get_hrtime())
>       return EVENT_CONT;
>     signal_event = VC_EVENT_INACTIVITY_TIMEOUT;
>     signal_timeout_at = &next_inactivity_timeout_at;
>   } else {
>     signal_event = VC_EVENT_ACTIVE_TIMEOUT;
>     signal_timeout_at = &next_activity_timeout_at;
>   }
> #endif
> {code}
> To enable InactiveCop, the INACTIVITY_TIMEOUT is not defined.
> an event == EVENT_INTERVAL callback means VC_EVENT_ACTIVE_TIMEOUT.
> but there are only EVENT_IMMEDIATE callbacked from InactiveCop.



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

Reply via email to