From 1cc71909a619ee9f081ccb0646aeb015fd6f7598 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Sat, 30 Jun 2012 17:04:26 +0530 Subject: rpc: Fixed ping timer algo. The purpose of the ping timer is to assert the absence of any evidence the server is possibly alive. The current implementation updates the 'last_sent' timer in the following points in time, - rpc_clnt_submit: when rpc messages are being queued at the transport layer. (wrong!, since we have no way to determine if server actually received the message) - rpc_clnt_notify: when client receives pollout event on sending a message on the 'wire'. (correct, since it indicates ACK from server) The fix removes the 'incorrect' update of 'last_sent'. Change-Id: I56af7b15c3672673696977a7c50ee66eafa4ec55 BUG: 836448 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.com/3624 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- rpc/rpc-lib/src/rpc-clnt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 356b10c29a7..3cfd92a17a2 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -1497,7 +1497,6 @@ rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog, } if ((ret >= 0) && frame) { - gettimeofday (&conn->last_sent, NULL); /* Save the frame in queue */ __save_frame (rpc, frame, rpcreq); -- cgit