Merge "Stop looking for master once latest seqno found"

This commit is contained in:
Jenkins 2016-06-27 10:38:42 +00:00 committed by Gerrit Code Review
commit 36f48ac89d
1 changed files with 4 additions and 1 deletions

View File

@ -429,7 +429,10 @@ get_master() {
# Cut the gtids off the stored GTID:SEQNO pairs, then
# filter the master, which is one who has the latest SEQNO from the possible masters
for NODE in $POSSIBLE_MASTERS; do
[ "${LATEST_SEQNO}" = "${TMP[$NODE]#*:}" ] && MASTER=$NODE
if [ "${LATEST_SEQNO}" = "${TMP[$NODE]#*:}" ]; then
MASTER=$NODE
break
fi
done
ocf_log info "${LH} Choosed master: ${MASTER} with GTID: ${TMP[$MASTER]}"
echo "$MASTER"