summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-pmap.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2016-07-03 15:51:20 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-07-05 07:43:24 -0700
commit4c012e223f89f9515cd3f8ebec1197ec1594218c (patch)
tree7e48f90ce32af179225d3e6ce854b084390e3a88 /xlators/mgmt/glusterd/src/glusterd-pmap.c
parent528a19825420362b4b873bbd4070b0496ab86a39 (diff)
glusterd: compare uuid instead of hostname address resolution
Backport of http://review.gluster.org/14849 In glusterd_get_brickinfo () brick's hostname is address resolved. This adds an unnecessary latency since it uses calls like getaddrinfo (). Instead given the local brick's uuid is already known a comparison of MY_UUID and brickinfo->uuid is much more light weight than the previous approach. On a scale testing where cluster hosting ~400 volumes spanning across 4 nodes, if a node goes for a reboot, few of the bricks don't come up. After few days of analysis its found that glusterd_pmap_sigin () was taking signficant amount of latency and further code walthrough revealed this unnecessary address resolution. Applying this fix solves the issue and now all the brick processes come up on a node reboot. Backport of commit 633e6fe265bc2de42dade58dc6a15c285957da76: > Change-Id: I299b8660ce0da6f3f739354f5c637bc356d82133 > BUG: 1352279 > Signed-off-by: Atin Mukherjee <amukherj@redhat.com> > Reviewed-on: http://review.gluster.org/14849 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Prashanth Pai <ppai@redhat.com> > Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> > Reviewed-by: Kaushal M <kaushal@redhat.com> Change-Id: I299b8660ce0da6f3f739354f5c637bc356d82133 BUG: 1352817 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14860 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-pmap.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-pmap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.c b/xlators/mgmt/glusterd/src/glusterd-pmap.c
index cbc800595ab..192a1d95258 100644
--- a/xlators/mgmt/glusterd/src/glusterd-pmap.c
+++ b/xlators/mgmt/glusterd/src/glusterd-pmap.c
@@ -416,8 +416,7 @@ __gluster_pmap_signin (rpcsvc_request_t *req)
rsp.op_ret = pmap_registry_bind (THIS, args.port, args.brick,
GF_PMAP_PORT_BRICKSERVER, req->trans);
- ret = glusterd_get_brickinfo (THIS, args.brick, args.port, _gf_true,
- &brickinfo);
+ ret = glusterd_get_brickinfo (THIS, args.brick, args.port, &brickinfo);
fail:
glusterd_submit_reply (req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_pmap_signin_rsp);
@@ -457,8 +456,7 @@ __gluster_pmap_signout (rpcsvc_request_t *req)
rsp.op_ret = pmap_registry_remove (THIS, args.port, args.brick,
GF_PMAP_PORT_BRICKSERVER, req->trans);
- ret = glusterd_get_brickinfo (THIS, args.brick, args.port, _gf_true,
- &brickinfo);
+ ret = glusterd_get_brickinfo (THIS, args.brick, args.port, &brickinfo);
if (args.rdma_port) {
snprintf(brick_path, PATH_MAX, "%s.rdma", args.brick);
rsp.op_ret = pmap_registry_remove (THIS, args.rdma_port,