Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Comments

ForceMaster election library#1453

Merged
gdbelvin merged 2 commits intogoogle:masterfrom
gdbelvin:focemaster
Feb 13, 2020
Merged

ForceMaster election library#1453
gdbelvin merged 2 commits intogoogle:masterfrom
gdbelvin:focemaster

Conversation

@gdbelvin
Copy link
Contributor

The previous NoopElection broke the API contract of the election factory
because it did not cancel contexts upon resigning. As a result, the KT
sequencer hung attempting to resign mastership.

This PR introduces a new forcemaster.Election which respects the election
API, and tests it against the election.Tracker.

@gdbelvin gdbelvin requested a review from a team as a code owner February 13, 2020 16:52
@gdbelvin gdbelvin requested a review from AlCutter February 13, 2020 16:52
@codecov
Copy link

codecov bot commented Feb 13, 2020

Codecov Report

Merging #1453 into master will increase coverage by 1.36%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1453      +/-   ##
==========================================
+ Coverage   66.59%   67.95%   +1.36%     
==========================================
  Files          54       54              
  Lines        4026     4026              
==========================================
+ Hits         2681     2736      +55     
+ Misses        956      890      -66     
- Partials      389      400      +11     
Impacted Files Coverage Δ
core/sequencer/trillian_client.go 58.57% <0.00%> (-7.15%) ⬇️
core/sequencer/server.go 72.96% <0.00%> (-1.31%) ⬇️
impl/sql/directory/storage.go 69.17% <0.00%> (ø) ⬆️
core/keyserver/revisions.go 64.62% <0.00%> (+2.04%) ⬆️
core/sequencer/election/tracker.go 70.11% <0.00%> (+70.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 128f290...563a5f1. Read the comment docs.

The previous NoopElection broke the API contract of the election
factory because it did not cancel contexts upon resigning.
As a result, the KT sequencer hung attempting to resign mastership.

This PR introduces a new `forcemaster.Election` which respects the
election API, and tests it against the `election.Tracker`.
@gdbelvin gdbelvin requested review from Mercurrent and removed request for AlCutter February 13, 2020 17:21
Copy link

@Mercurrent Mercurrent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ForceMaster?

@gdbelvin
Copy link
Contributor Author

gdbelvin commented Feb 13, 2020 via email

@gdbelvin gdbelvin merged commit abd6967 into google:master Feb 13, 2020
@gdbelvin gdbelvin deleted the focemaster branch February 13, 2020 17:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants