From 6930c6950f7b7a8186ebfcdf9ebcad11e90740c0 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Thu, 9 Aug 2012 19:29: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. Change-Id: Id5f68f2ff28ea7453d9a62429fe12aa0c0a66952 BUG: 843003 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.com/3803 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/rpc-lib') diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 9fba3fe41..f68c57230 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 f07ad8d36..0da165559 100644 --- a/rpc/rpc-lib/src/rpc-clnt.h +++ b/rpc/rpc-lib/src/rpc-clnt.h @@ -238,7 +238,8 @@ int rpcclnt_cbk_program_register (struct rpc_clnt *svc, rpcclnt_cb_program_t *program, void *mydata); 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