David Ribeiro Alves has uploaded this change for review. ( http://gerrit.cloudera.org:8080/9161
Change subject: Don't rely on pending config OpId index for peer promotion ...................................................................... Don't rely on pending config OpId index for peer promotion As part of the effort to make OpId and timestamp assignment atomic we can't rely on a pending config having been assigned an OpId anymore. This because the config is marked as the active config _before_ an OpId is assigned later on, by the queue. The OpId only actually gets set when the config is committed. Follow up patches will complete remove this reliance. In general this doesn't have much impact except where we're promoting a peer. In this case we currently pass the current active config's term and index from the queue back to consensus which then uses this info to perform the promotion only when the current term and index match. We can't do this in the new setting where the term and index are not available, but moreover this info is not strictly needed for promotion at all, so this patch removes this extra info being passed around. The reasoning why the extra info is not needed is the following: - If a peer' uuid is marked for promotion in the current committed config, as verified directly through cmeta, and is considered up-to-date enough to be promoted, it doesn't matter whether the active config in the queue is the same as the committed config. The peer still can and should be promoted. - Essentially, omitting this extra info just means that we have to re-check that the member type and attributes are still the expected ones, which is not costly. Change-Id: I3a033ce16f626458efdb59b1b4dd8450e8591761 --- M src/kudu/consensus/consensus_queue.cc M src/kudu/consensus/consensus_queue.h M src/kudu/consensus/raft_consensus.cc M src/kudu/consensus/raft_consensus.h 4 files changed, 34 insertions(+), 54 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/61/9161/1 -- To view, visit http://gerrit.cloudera.org:8080/9161 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3a033ce16f626458efdb59b1b4dd8450e8591761 Gerrit-Change-Number: 9161 Gerrit-PatchSet: 1 Gerrit-Owner: David Ribeiro Alves <[email protected]>
