mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
ubik: Don't clear ubik_lastYesTime on startup
In uvote_Init, we set ubik_lastYesTime to the current time just a few lines before. It is important to set ubik_lastYesTime to the current time, since that prevents us from voting for anyone in an ubik election for at least BIGTIME seconds. If we clear ubik_lastYesTime to 0, that means restarting a ubik server could cause it to immediately start voting for a different site than it was voting for before it started. This violates one of the ubik invariants; as mentioned in the comments in SVOTE_Beacon, we cannot promise sync site support to more than one site within BIGTIME seconds. So initializing ubik_lastYesTime to 0 could cause two different sites to be voted sync site simultaneously, if our restart caused a premature change in vote. Change-Id: I410fbefa8d699aac1c900d1fdd4e355b87917ad7 Reviewed-on: https://gerrit.openafs.org/12279 Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Jeffrey Altman <jaltman@auristor.com> Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
3c7a315b63
commit
562efa7e4c
@ -595,7 +595,6 @@ uvote_Init(void)
|
||||
vote_globals.ubik_lastYesTime = FT_ApproxTime();
|
||||
|
||||
/* Initialize globals */
|
||||
vote_globals.ubik_lastYesTime = 0;
|
||||
vote_globals.lastYesHost = 0xffffffff;
|
||||
vote_globals.lastYesClaim = 0;
|
||||
vote_globals.lastYesState = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user