You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2016/04/27 03:24:01 UTC

[kudu-CR] master: when replacing tablets, don't expose mutated state too early

Hello Todd Lipcon,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: master: when replacing tablets, don't expose mutated state too early
......................................................................

master: when replacing tablets, don't expose mutated state too early

This patch plugs the last "expose new in-memory state before replication
succeeds" hole, which happens when CatalogManagerBgTasks decides to replace
a tablet. A side benefit of addressing it is the removal of more
crufty-looking abort code.

Speaking of, can you spot the bug in that crufty-looking abort code? Here it
is: IsCreateTableDone() can return true for tables whose tablets were never
assigned (because all of the tservers are dead, say). It can happen because
there's a brief window of time during which a table has all of its tablets
removed, at which point the answer to the question "are all of this table's
tablets RUNNING?" is "yes".

Change-Id: I00dcd0dae925fe8258eb2d160226e07b3a3b0f05
---
M src/kudu/integration-tests/create-table-itest.cc
M src/kudu/master/catalog_manager-test.cc
M src/kudu/master/catalog_manager.cc
3 files changed, 32 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/79/2879/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2879
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00dcd0dae925fe8258eb2d160226e07b3a3b0f05
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>