The following commit has been merged in the openafs-stable-1_6_x branch:
commit 60c148bc344d6048c23ede4fac8911b45223c314
Author: Marcio Barbosa <[email protected]>
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-on: https://gerrit.openafs.org/12592
Reviewed-by: Andrew Deason <[email protected]>
Reviewed-by: Benjamin Kaduk <[email protected]>
Tested-by: Benjamin Kaduk <[email protected]>
(cherry picked from commit 7c7085061580ccce7b2d9c17df5604e5e97fcd81)
Change-Id: Ib0e3406268547101bdda0a30e90b02184c3e305f
Reviewed-on: https://gerrit.openafs.org/12803
Tested-by: BuildBot <[email protected]>
Reviewed-by: Andrew Deason <[email protected]>
Reviewed-by: Mark Vitale <[email protected]>
Reviewed-by: Michael Meffie <[email protected]>
Reviewed-by: Marcio Brito Barbosa <[email protected]>
Reviewed-by: Hartmut Reuter <[email protected]>
Reviewed-by: Stephan Wiesand <[email protected]>
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
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs