From 30a9ebd91339f36d092f46bbba116fa4047fb8c5 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Fri, 17 Aug 2012 13:12:33 +0530 Subject: rpc: Reduce frame-timeout for glusterd connections Reduce frame-timeout for glusterd connections from 30mins to 10 mins. 30mins is too long when compared to cli timeout of 2mins. Changing to 10mins reduces the disparity between cli and glusterd. Also, fix glusterfs_submit_reply() so that a reply is sent even if serialize failed. BUG: 843003 Change-Id: Ie8d5ec16fbbb54318a5935a47065e66fd3338b87 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.com/3812 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- rpc/rpc-lib/src/rpc-clnt.c | 9 ++++++++- rpc/rpc-lib/src/rpc-clnt.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 3cfd92a17a2..f011de5de0c 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -1679,7 +1679,8 @@ rpc_clnt_reconfig (struct rpc_clnt *rpc, struct rpc_clnt_config *config) } int -rpc_clnt_transport_unix_options_build (dict_t **options, char *filepath) +rpc_clnt_transport_unix_options_build (dict_t **options, char *filepath, + int frame_timeout) { dict_t *dict = NULL; char *fpath = NULL; @@ -1718,6 +1719,12 @@ rpc_clnt_transport_unix_options_build (dict_t **options, char *filepath) if (ret) goto out; + if (frame_timeout > 0) { + ret = dict_set_int32 (dict, "frame-timeout", frame_timeout); + if (ret) + goto out; + } + *options = dict; out: if (ret) { diff --git a/rpc/rpc-lib/src/rpc-clnt.h b/rpc/rpc-lib/src/rpc-clnt.h index e7335e38839..ca3c1d027a2 100644 --- a/rpc/rpc-lib/src/rpc-clnt.h +++ b/rpc/rpc-lib/src/rpc-clnt.h @@ -235,7 +235,8 @@ int rpcclnt_cbk_program_register (struct rpc_clnt *svc, rpcclnt_cb_program_t *program); int -rpc_clnt_transport_unix_options_build (dict_t **options, char *filepath); +rpc_clnt_transport_unix_options_build (dict_t **options, char *filepath, + int frame_timeout); void rpc_clnt_disable (struct rpc_clnt *rpc); -- cgit