summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-08-09 19:29:33 +0530
committerVijay Bellur <vbellur@redhat.com>2012-08-17 01:12:36 -0700
commit6930c6950f7b7a8186ebfcdf9ebcad11e90740c0 (patch)
tree1dc2f56fad7ede0eb9d6c50f499f7ac82023817b /rpc/rpc-lib
parentacf73966abd3ad3fe341a933f76c821e19fd7b95 (diff)
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 <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3803 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c9
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.h3
2 files changed, 10 insertions, 2 deletions
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);