You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/08/27 00:45:20 UTC

[kudu-CR] raft consensus-itest: inserter thread should FATAL instead of FAIL

Hello Mike Percy,

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

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

to review the following change.

Change subject: raft_consensus-itest: inserter thread should FATAL instead of FAIL
......................................................................

raft_consensus-itest: inserter thread should FATAL instead of FAIL

This test has a thread which inserts rows and is supposed to fail the
test case if it sees any row errors. Failing the test using FAIL() from
a non-main thread is not thread-safe in gtest. Furthermore, FAIL() acts
as a 'return' and thus the latch used to communicate the thread
completion never gets fired. So, when this assertion failed, the test
would hang forever.

This was a regression caused by d0cff255f84e75b70c0c39ccd34a35f348e3c722
which changed the code from a CHECK(...) to a FAIL().

In order to correct this behavior, this patch switches to using the
utility method FlushSessionOrDie() which has an identical
implementation.

Change-Id: I9dbe1e551b7f1b8b81ce0156627deb096db5112b
---
M src/kudu/integration-tests/raft_consensus-itest.cc
1 file changed, 1 insertion(+), 21 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dbe1e551b7f1b8b81ce0156627deb096db5112b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Mike Percy <mp...@apache.org>

[kudu-CR] raft consensus-itest: inserter thread should FATAL instead of FAIL

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

Change subject: raft_consensus-itest: inserter thread should FATAL instead of FAIL
......................................................................


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dbe1e551b7f1b8b81ce0156627deb096db5112b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-HasComments: No

[kudu-CR] raft consensus-itest: inserter thread should FATAL instead of FAIL

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

Change subject: raft_consensus-itest: inserter thread should FATAL instead of FAIL
......................................................................


Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dbe1e551b7f1b8b81ce0156627deb096db5112b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-HasComments: No

[kudu-CR] raft consensus-itest: inserter thread should FATAL instead of FAIL

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

Change subject: raft_consensus-itest: inserter thread should FATAL instead of FAIL
......................................................................


Patch Set 1:

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dbe1e551b7f1b8b81ce0156627deb096db5112b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-HasComments: No

[kudu-CR] raft consensus-itest: inserter thread should FATAL instead of FAIL

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

Change subject: raft_consensus-itest: inserter thread should FATAL instead of FAIL
......................................................................


raft_consensus-itest: inserter thread should FATAL instead of FAIL

This test has a thread which inserts rows and is supposed to fail the
test case if it sees any row errors. Failing the test using FAIL() from
a non-main thread is not thread-safe in gtest. Furthermore, FAIL() acts
as a 'return' and thus the latch used to communicate the thread
completion never gets fired. So, when this assertion failed, the test
would hang forever.

This was a regression caused by d0cff255f84e75b70c0c39ccd34a35f348e3c722
which changed the code from a CHECK(...) to a FAIL().

In order to correct this behavior, this patch switches to using the
utility method FlushSessionOrDie() which has an identical
implementation.

Change-Id: I9dbe1e551b7f1b8b81ce0156627deb096db5112b
Reviewed-on: http://gerrit.cloudera.org:8080/4140
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: Mike Percy <mp...@apache.org>
---
M src/kudu/integration-tests/raft_consensus-itest.cc
1 file changed, 1 insertion(+), 21 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9dbe1e551b7f1b8b81ce0156627deb096db5112b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>