glusterd: fix quorum calculation logic
glusterd_get_quorum_cluster_counts () skips quorum calculation if it finds any of its peer in QUORUM_WAITING state. This means if any peer probe has been triggered and at the same point of time a transaction has been initiated, it might pass through the server quorum check which it should not. Change-Id: I44eda8905eab3349c9ebf2842e7131d4e758a528 BUG: 1232686 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11275 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
This commit is contained in:
parent
b5fd1bca37
commit
0be38bdb40
@ -212,11 +212,6 @@ glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count,
|
||||
|
||||
rcu_read_lock ();
|
||||
cds_list_for_each_entry_rcu (peerinfo, &conf->peers, uuid_list) {
|
||||
if (peerinfo->quorum_contrib == QUORUM_WAITING) {
|
||||
rcu_read_unlock ();
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (_is_contributing_to_quorum (peerinfo->quorum_contrib))
|
||||
inquorum_count = inquorum_count + 1;
|
||||
if (active_count && (peerinfo->quorum_contrib == QUORUM_UP))
|
||||
@ -239,7 +234,7 @@ glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count,
|
||||
|
||||
*quorum_count = count;
|
||||
ret = 0;
|
||||
out:
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user