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

[kudu-CR] master failover-itest: eliminate some flakiness

Hello Todd Lipcon,

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

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

to review the following change.

Change subject: master_failover-itest: eliminate some flakiness
......................................................................

master_failover-itest: eliminate some flakiness

Due to the inherent asynchronicity of SIGSTOP and the lack of "exactly once"
semantics [1], it's possible for any DDL operation issued by these tests to
return a result suggesting it had already been performed prior to being
issued. See TestCreateTableSync for a detailed example.

I've never run into this myself, but it has occurred at least once [2] in
the wild.

1. Beyond basic EO semantics, RPC results would need to be persisted and
   replicated, neither of which are in scope for David's current project.
2. http://dist-test.cloudera.org:8080/diagnose?key=d73c47c0-3c15-11e6-8c40-0242ac110001

Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
---
M src/kudu/integration-tests/master_failover-itest.cc
1 file changed, 45 insertions(+), 32 deletions(-)


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

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

[kudu-CR] master failover-itest: eliminate some flakiness

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: master_failover-itest: eliminate some flakiness
......................................................................


Patch Set 1:

(1 comment)

+2 with the commit message comment caveat

http://gerrit.cloudera.org:8080/#/c/3521/1//COMMIT_MSG
Commit Message:

Line 17: 1. Beyond basic EO semantics, RPC results would need to be persisted and
For writes, we make sure that writes are executed exactly once, and because of that when a node rebuilds the response, we're sure that it must be the same across all nodes

why would we need to persist/replicate here?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] master failover-itest: eliminate some flakiness

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: master_failover-itest: eliminate some flakiness
......................................................................


Patch Set 1:

Build Started http://104.196.14.100/job/kudu-gerrit/2085/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] master failover-itest: eliminate some flakiness

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: master_failover-itest: eliminate some flakiness
......................................................................


Patch Set 1:

Because, upon election and subsequent rebuild of master state, the new leader master must have replayed the operations, and can thus have the responses available.

This is in fact what happens on writes. The case is very similar. If the leader of the tablet died before sending the response, it's ok because the new leader must have played the same write and can thus rebuild the response, without having to persist or replicate it.

The key thing here is that each time a operation is _successfully_ applied, the response must be exactly the same, so there is no need to persist it.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] master failover-itest: eliminate some flakiness

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

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

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

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

Change subject: master_failover-itest: eliminate some flakiness
......................................................................

master_failover-itest: eliminate some flakiness

Due to the inherent asynchronicity of SIGSTOP and the lack of "exactly once"
semantics [1], it's possible for any DDL operation issued by these tests to
return a result suggesting it had already been performed prior to being
issued. See TestCreateTableSync for a detailed example.

I've never run into this myself, but it has occurred at least once [2] in
the wild.

1. EO semantics are being implemented as part of the replay cache work, but
   to fix this particular problem we'll need some additional logic (i.e.
   we'd need to copy RPC information from e.g. CreateTableRequestPB into the
   replicated WriteRequestPB that corresponds to the created table).
2. http://dist-test.cloudera.org:8080/diagnose?key=d73c47c0-3c15-11e6-8c40-0242ac110001

Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
---
M src/kudu/integration-tests/master_failover-itest.cc
1 file changed, 45 insertions(+), 32 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] master failover-itest: eliminate some flakiness

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: master_failover-itest: eliminate some flakiness
......................................................................


Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] master failover-itest: eliminate some flakiness

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged.

Change subject: master_failover-itest: eliminate some flakiness
......................................................................


master_failover-itest: eliminate some flakiness

Due to the inherent asynchronicity of SIGSTOP and the lack of "exactly once"
semantics [1], it's possible for any DDL operation issued by these tests to
return a result suggesting it had already been performed prior to being
issued. See TestCreateTableSync for a detailed example.

I've never run into this myself, but it has occurred at least once [2] in
the wild.

1. EO semantics are being implemented as part of the replay cache work, but
   to fix this particular problem we'll need some additional logic (i.e.
   we'd need to copy RPC information from e.g. CreateTableRequestPB into the
   replicated WriteRequestPB that corresponds to the created table).
2. http://dist-test.cloudera.org:8080/diagnose?key=d73c47c0-3c15-11e6-8c40-0242ac110001

Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Reviewed-on: http://gerrit.cloudera.org:8080/3521
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <dr...@apache.org>
---
M src/kudu/integration-tests/master_failover-itest.cc
1 file changed, 45 insertions(+), 32 deletions(-)

Approvals:
  David Ribeiro Alves: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] master failover-itest: eliminate some flakiness

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: master_failover-itest: eliminate some flakiness
......................................................................


Patch Set 2:

Build Started http://104.196.14.100/job/kudu-gerrit/2123/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] master failover-itest: eliminate some flakiness

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.

Change subject: master_failover-itest: eliminate some flakiness
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3521/1//COMMIT_MSG
Commit Message:

Line 17: 1. Beyond basic EO semantics, RPC results would need to be persisted and
> For writes, we make sure that writes are executed exactly once, and because
Consider the sequence of events I described in the patch, which I'll reprint below:

  1. Pause() is issued.
  2. CreateTable() is issued.
  3. Leader master receives CreateTable() and creates the table.
  4. Leader master is paused before the CreateTable() response is sent.
  5. Client times out, finds the new master, and retries CreateTable().
  6. The retry fails because the table was already created in step 3.

The desired semantics are for the client to receive the exact same RPC response at the end of step 5 as it would have at the end of step 3 had the old leader master not been paused. But, given that in step 5 the client is talking to the new leader master, it seems to me that the only way to guarantee the exact RPC response is for the old leader master to have replicated it to its followers. Otherwise, how would the new leader master know how to build that RPC response?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba6da4d2a4333760022c68783c32dc2689a8a26
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes