Mike Percy has submitted this change and it was merged. ( 
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
Reviewed-on: http://gerrit.cloudera.org:8080/9161
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <[email protected]>
Reviewed-by: Mike Percy <[email protected]>
---
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(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, but someone else must approve
  Mike Percy: Looks good to me, approved

--
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: merged
Gerrit-Change-Id: I3a033ce16f626458efdb59b1b4dd8450e8591761
Gerrit-Change-Number: 9161
Gerrit-PatchSet: 4
Gerrit-Owner: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to