summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-08-17 13:12:33 +0530
committerVijay Bellur <vbellur@redhat.com>2012-08-17 01:13:01 -0700
commit30a9ebd91339f36d092f46bbba116fa4047fb8c5 (patch)
tree418fc23b53d2e12d9db196cfb43477098050d520 /rpc
parentb96e499e9e290547a655072fede969f51854e2d8 (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. BUG: 843003 Change-Id: Ie8d5ec16fbbb54318a5935a47065e66fd3338b87 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3812 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'rpc')
-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 3cfd92a..f011de5 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 e7335e3..ca3c1d0 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);