Bug 762639 (GLUSTER-907) - cancel ping timer in case of socket fd error or iberror
Summary: cancel ping timer in case of socket fd error or iberror
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-907
Product: GlusterFS
Classification: Community
Component: protocol
Version: mainline
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: shishir gowda
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-07 19:10 UTC by Krishna Srinivas
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Krishna Srinivas 2010-05-07 16:12:43 UTC
(In reply to comment #0)
> when client_ping_cbk() is called not because of timer getting expired but
> because of socket fd error (in case of tcpip) or ib error, we need to clean up
> the associated timer, else timer will be called after 42 secs which will
> disconnect a valid active connectoin.
> 
> client_ping_cbk():
>         if (op_ret == -1) {
>                 /* timer expired and transport bailed out */
>                 gf_log (this->name, GF_LOG_DEBUG, "timer must have expired");
>                 goto out;
>         }
> 
> if op_ret is -1 the do:
> 
> if (conn->ping_timer != NULL) {
>         gf_timer_call_cancel (trans->xl->ctx, conn->ping_timer);


// and also
          conn->ping_timer = NULL;


> }

Comment 1 Krishna Srinivas 2010-05-07 19:10:25 UTC
when client_ping_cbk() is called not because of timer getting expired but because of socket fd error (in case of tcpip) or ib error, we need to clean up the associated timer, else timer will be called after 42 secs which will disconnect a valid active connectoin.

client_ping_cbk():
        if (op_ret == -1) {
                /* timer expired and transport bailed out */
                gf_log (this->name, GF_LOG_DEBUG, "timer must have expired");
                goto out;
        }

if op_ret is -1 the do:

if (conn->ping_timer != NULL) {
        gf_timer_call_cancel (trans->xl->ctx, conn->ping_timer);
}

Comment 2 Anand Avati 2010-07-27 05:20:20 UTC
PATCH: http://patches.gluster.com/patch/3911 in master (Cancel ping timer if socket or ib error)


Note You need to log in before you can comment on or make changes to this bug.