Bug 1476719 - glusterd: flow in glusterd_validate_quorum() could be streamlined
glusterd: flow in glusterd_validate_quorum() could be streamlined
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Adam
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2017-07-31 05:49 EDT by Michael Adam
Modified: 2017-08-01 06:12 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Adam 2017-07-31 05:49:54 EDT
glusterd_validate_quorum performs unnecessary operations when the volume is not of server-quorum type "server". This could be optimized.
Comment 1 Worker Ant 2017-07-31 05:51:05 EDT
REVIEW: https://review.gluster.org/17924 (glusterd: streamline logic flow in glusterd_validate_quorum()) posted (#1) for review on master by Michael Adam (obnox@samba.org)
Comment 2 Worker Ant 2017-08-01 06:11:41 EDT
COMMIT: https://review.gluster.org/17924 committed in master by Atin Mukherjee (amukherj@redhat.com) 
commit 3023c4bd7651d4503830c36676cd08864e315cdf
Author: Michael Adam <obnox@samba.org>
Date:   Tue Jun 13 14:44:39 2017 +0200

    glusterd: streamline logic flow in glusterd_validate_quorum()
    Make an earlier exit when the volume is not of server quorum.
    Thereby it spares the actual quorum calculation in this case.
    This also increases the overall readability of the function.
    The patch is best seen with the --patience diff option to
    understand what it does (e.g. "git show --patience").
    Change-Id: Ifce50bc3f73d79d3d6226473661a83696d65149a
    BUG: 1476719
    Signed-off-by: Michael Adam <obnox@samba.org>
    Reviewed-on: https://review.gluster.org/17924
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    Tested-by: Atin Mukherjee <amukherj@redhat.com>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Amar Tumballi <amarts@redhat.com>
    Reviewed-by: Atin Mukherjee <amukherj@redhat.com>

Note You need to log in before you can comment on or make changes to this bug.