Todd Lipcon has submitted this change and it was merged.

Change subject: KUDU-1338. Pending raft config should be cleared when 
CHANGE_CONFIG is aborted
......................................................................


KUDU-1338. Pending raft config should be cleared when CHANGE_CONFIG is aborted

This fixes the issue described in KUDU-1338: when a config-change operation
is aborted on a replica, it's important to clear the pending configuration
state. Otherwise, we can hit either of two issues:

1) The replica will become 'stuck' in the case that a different leader
proposes a new change-config. The replica won't accept the new config
change since a change is already pending, and then never makes further
progress.

2) If the replica manages to elect itself leader, it could result
in Raft divergence when it continues to operate with a stale
configuration.

The patch contains a simple test modification which reliably reproduced the
first of the two issues.

Change-Id: Id2e99e4e67e2d6324c8123f79bea84523581b78b
Reviewed-on: http://gerrit.cloudera.org:8080/2483
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <[email protected]>
---
M docs/design-docs/raft-config-change.md
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus_state.cc
M src/kudu/integration-tests/raft_consensus-itest.cc
4 files changed, 29 insertions(+), 7 deletions(-)

Approvals:
  Mike Percy: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/2483
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2e99e4e67e2d6324c8123f79bea84523581b78b
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Jean-Daniel Cryans
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to