The following commit has been merged in the openafs-stable-1_6_x branch:
Author: Marcio Barbosa <mbarb...@sinenomine.net>
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 <adea...@dson.org>
Reviewed-by: Benjamin Kaduk <ka...@mit.edu>
Tested-by: Benjamin Kaduk <ka...@mit.edu>
(cherry picked from commit 7c7085061580ccce7b2d9c17df5604e5e97fcd81)
Tested-by: BuildBot <build...@rampaginggeek.com>
Reviewed-by: Andrew Deason <adea...@sinenomine.net>
Reviewed-by: Mark Vitale <mvit...@sinenomine.net>
Reviewed-by: Michael Meffie <mmef...@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarb...@sinenomine.net>
Reviewed-by: Hartmut Reuter <reu...@rzg.mpg.de>
Reviewed-by: Stephan Wiesand <stephan.wies...@desy.de>
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
OpenAFS-cvs mailing list