OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_22_2-12-g60c148b

Gerrit Code Review gerrit@openafs.org
Fri, 23 Feb 2018 07:22:48 -0500


The following commit has been merged in the openafs-stable-1_6_x branch:
commit 60c148bc344d6048c23ede4fac8911b45223c314
Author: Marcio Barbosa <mbarbosa@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-on: https://gerrit.openafs.org/12592
    Reviewed-by: Andrew Deason <adeason@dson.org>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Tested-by: Benjamin Kaduk <kaduk@mit.edu>
    (cherry picked from commit 7c7085061580ccce7b2d9c17df5604e5e97fcd81)
    
    Change-Id: Ib0e3406268547101bdda0a30e90b02184c3e305f
    Reviewed-on: https://gerrit.openafs.org/12803
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
    Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@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