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/10/05 21:42:03 UTC

[kudu-CR] maintenance manager-test: fix flaky test

Hello Dan Burkert, Jean-Daniel Cryans,

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

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

to review the following change.

Change subject: maintenance_manager-test: fix flaky test
......................................................................

maintenance_manager-test: fix flaky test

TestCompletedOps failed relatively often because of the following racy
interleaving:

- Multiple MM threads called Prepare() while remaining_runs_ was positive
- These threads then called Perform(), which decremented remaining_runs_
  once per thread. This resulted in the op being called more times than
  'remaining_runs_', causing an assertion failure.

The fix is to separately count the number of 'prepared' ops.

Change-Id: I003e72339f69228195130c89572a20be3009f22c
---
M src/kudu/util/maintenance_manager-test.cc
1 file changed, 10 insertions(+), 2 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I003e72339f69228195130c89572a20be3009f22c
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>

[kudu-CR] maintenance manager-test: fix flaky test

Posted by "Jean-Daniel Cryans (Code Review)" <ge...@cloudera.org>.
Jean-Daniel Cryans has posted comments on this change.

Change subject: maintenance_manager-test: fix flaky test
......................................................................


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I003e72339f69228195130c89572a20be3009f22c
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] maintenance manager-test: fix flaky test

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

Change subject: maintenance_manager-test: fix flaky test
......................................................................


maintenance_manager-test: fix flaky test

TestCompletedOps failed relatively often because of the following racy
interleaving:

- Multiple MM threads called Prepare() while remaining_runs_ was positive
- These threads then called Perform(), which decremented remaining_runs_
  once per thread. This resulted in the op being called more times than
  'remaining_runs_', causing an assertion failure.

The fix is to separately count the number of 'prepared' ops.

Change-Id: I003e72339f69228195130c89572a20be3009f22c
Reviewed-on: http://gerrit.cloudera.org:8080/4634
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
Tested-by: Kudu Jenkins
---
M src/kudu/util/maintenance_manager-test.cc
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Jean-Daniel Cryans: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I003e72339f69228195130c89572a20be3009f22c
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>