Hello Alexey Serbin, Kudu Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/21004

to look at the new patch set (#2).

Change subject: [catalog_manager] Tighten leader UUID fallback
......................................................................

[catalog_manager] Tighten leader UUID fallback

It is safe to assume that if the term is the same in the current cstate
as in the previous cstate then even if the leader is not set, it will
be the same. But it is possible that cmeta file is deleted then
recreated with "local_replica cmeta unsafe_recreate" command. In this
case the leader_uuid is empty in the new cmeta file. This means that the
peer doesn't consider itself a leader, so no health report is generated
in tablet report and it has no leader_uuid set either. When a master
receives tablet report like this and there isn't a new term, then the
catalog master will treat this peer as a leader, but it will fail on a
check because the leader has to be in healthy status. This happened in
ToolTest::TestRecreateCMeta. As a reproduction step, the same test now
runs with a single TServer configuration, too. In this configuration the
error is reproducible 100% of the times, since the term is not increased
and the leader's cmeta file is changed.

The solution is that catalog manager only assumes the previous leader
for the peer if the previous leader is not the peer itself. This gives
time for the peers to form a consensus about the leader.

Change-Id: I06a80a4a0a9fd422b50860e8cd8bf0e12973cd43
---
M src/kudu/master/catalog_manager.cc
M src/kudu/tools/kudu-tool-test.cc
2 files changed, 11 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/04/21004/2
--
To view, visit http://gerrit.cloudera.org:8080/21004
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I06a80a4a0a9fd422b50860e8cd8bf0e12973cd43
Gerrit-Change-Number: 21004
Gerrit-PatchSet: 2
Gerrit-Owner: Ádám Bakai <aba...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <ale...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Ádám Bakai <aba...@cloudera.com>

Reply via email to