OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_22_2-12-g60c148b
Gerrit Code Review
Fri, 23 Feb 2018 07:22:48 -0500
The following commit has been merged in the openafs-stable-1_6_x branch:
Author: Marcio Barbosa <email@example.com>
Date: Sat Dec 9 18:04:45 2017 -0300
ubik: avoid early DISK_Begin calls we know will fail
Currently, we can start a write transaction on a site immediately after
it is elected as the sync site. However, after commit d47beca1,
SDISK_Begin on remote sites will fail right after an election occurs
(since lastYesState is not set, and so urecovery_AllBetter will fail).
And after commit fac0b742, this error is always noticed and propagated
back to the application.
As a result, when we try to write immediately after a sync site is
elected, the transaction will fail with UNOQUORUM, the remote sites will
be marked as down, and we may lose quorum and require another election
to be performed. This can easily happen repeatedly for a site that
frequently tries to make changes to a ubik database.
To avoid marking other sites down and going through another election
process, do not allow write transactions until we know that lastYesState
is set on the remote sites. We do this by waiting until the next wave of
beacons are sent, which tell the remote sites that we are the sync site.
In other words, only allow write transactions after the sync site knows
that the remote sites also know that the sync site has been elected.
With this commit, a write transaction immediately after an election
will still fail with UNOQUORUM, but we avoid triggering an error on the
remote sites, and avoid losing quorum in this situation.
Reviewed-by: Andrew Deason <firstname.lastname@example.org>
Reviewed-by: Benjamin Kaduk <email@example.com>
Tested-by: Benjamin Kaduk <firstname.lastname@example.org>
(cherry picked from commit 7c7085061580ccce7b2d9c17df5604e5e97fcd81)
Tested-by: BuildBot <email@example.com>
Reviewed-by: Andrew Deason <firstname.lastname@example.org>
Reviewed-by: Mark Vitale <email@example.com>
Reviewed-by: Michael Meffie <firstname.lastname@example.org>
Reviewed-by: Marcio Brito Barbosa <email@example.com>
Reviewed-by: Hartmut Reuter <firstname.lastname@example.org>
Reviewed-by: Stephan Wiesand <email@example.com>
src/ubik/beacon.c | 30 ++++++++++++++++++++++++++++++
src/ubik/ubik.c | 5 +++++
src/ubik/ubik.p.h | 1 +
3 files changed, 36 insertions(+), 0 deletions(-)
OpenAFS Master Repository