diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2018-01-29 10:23:52 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-01-31 17:58:24 +0000 |
commit | a32ff73c06e1e14589817b1701c1c8d0f05aaa04 (patch) | |
tree | b2b6a0a17ab663973ca8fb4963a9892b61877ffc /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | fe2f1c995371444a2695994a700c0a6287eadd20 (diff) |
glusterd: optimize glusterd import volumes code path
In case there's a version mismatch detected for one of the volumes
glusterd was ending up with updating all the volumes which is a
overkill.
>mainline patch : https://review.gluster.org/#/c/19358/
Change-Id: I6df792db391ce3a1697cfa9260f7dbc3f59aa62d
BUG: 1540554
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
(cherry picked from commit bb34b07fd2ec5e6c3eed4fe0cdf33479dbf5127b)
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index f93be144059..7d1fc33b05d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -4832,16 +4832,18 @@ glusterd_compare_friend_data (dict_t *peer_data, int32_t *status, ret = 0; goto out; } - if (GLUSTERD_VOL_COMP_UPDATE_REQ == *status) + if (GLUSTERD_VOL_COMP_UPDATE_REQ == *status) { + ret = glusterd_import_friend_volume (peer_data, i); + if (ret) { + goto out; + } update = _gf_true; - + *status = GLUSTERD_VOL_COMP_NONE; + } i++; } if (update) { - ret = glusterd_import_friend_volumes (peer_data); - if (ret) - goto out; glusterd_svcs_manager (NULL); } |