Terracotta-OSS / terracotta-platform

http://terracotta.org
Apache License 2.0
32 stars 48 forks source link

Re-implement voter #1169

Closed myronkscott closed 1 year ago

myronkscott commented 1 year ago

This is an attempt to cleanup voter code. The actions are all the same, just some re-organization of the pieces and some additions/changes to help tests. There are three main parts. VotingGroup is in charge of voting structures for each stripe. It continuously polls the topology and tries to maintain registrations with all the members that are alive. VotingGroup also makes sure only one server is being voted for during a voting session. This replaces ActiveVoter. ClientVoterThread is in charge of registration and heartbeating for each server in the stripe. ClientVoteManger is the connection plumbing to each server.

mathieucarbou commented 1 year ago

Do you plan on cherry picking that on the 5.9 branch also after it is merged? It would be nice to have both branches in sync for this part I think. (Taking as hypothesis that 5.9 is still used in EE 10.7 branch...?)

myronkscott commented 1 year ago

i didn't think about that. it should be a pretty clean port. i'll try it.

mathieucarbou commented 1 year ago

Anyone else want / need to review ?

myronkscott commented 1 year ago

hold off on merging just yet. There is one thing I want to fix plus squash the commits so it is easier to cherry-pick