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/11/21 03:49:01 UTC

[kudu-CR] rpc-test: fix flakiness on keepalive test

Hello Dan Burkert,

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

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

to review the following change.

Change subject: rpc-test: fix flakiness on keepalive test
......................................................................

rpc-test: fix flakiness on keepalive test

The keepalive test was using a pretty short keepalive and asserting on
the observed timing. In addition, the test was setting the keepalive
scanner and timer to a granularity equal to the keepalive time, which
meant that connections could time out much more quickly than expected,
eg:

- t=1000: timer tick runs, sets reactor's cur_time_ to t=1000ms
- t=1149: connection starts, sets last_activity_time_ = 1000ms
- t=1150: timer tick runs, sets reactor's cur_time to 1050ms
          scanner sees that the connection has been "idle" for 50ms

To fix this, the patch sets the timer granularity to 20% of the
keepalive time, to ensure that at most we are 20% off from the intended
time instead of 100% off.

This reduced the keepalive test flakiness from ~10% to 0%. One other
test case still appears to be flaky, but will address that separately.

Change-Id: I0900ad45e07c936186e3477dd0b82cb226e20361
---
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
2 files changed, 6 insertions(+), 3 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0900ad45e07c936186e3477dd0b82cb226e20361
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>

[kudu-CR] rpc-test: fix flakiness on keepalive test

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

Change subject: rpc-test: fix flakiness on keepalive test
......................................................................


Patch Set 1: Code-Review+2

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

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

[kudu-CR] rpc-test: fix flakiness on keepalive test

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

Change subject: rpc-test: fix flakiness on keepalive test
......................................................................


rpc-test: fix flakiness on keepalive test

The keepalive test was using a pretty short keepalive and asserting on
the observed timing. In addition, the test was setting the keepalive
scanner and timer to a granularity equal to the keepalive time, which
meant that connections could time out much more quickly than expected,
eg:

- t=1000: timer tick runs, sets reactor's cur_time_ to t=1000ms
- t=1149: connection starts, sets last_activity_time_ = 1000ms
- t=1150: timer tick runs, sets reactor's cur_time to 1050ms
          scanner sees that the connection has been "idle" for 50ms

To fix this, the patch sets the timer granularity to 20% of the
keepalive time, to ensure that at most we are 20% off from the intended
time instead of 100% off.

This reduced the keepalive test flakiness from ~10% to 0%. One other
test case still appears to be flaky, but will address that separately.

Change-Id: I0900ad45e07c936186e3477dd0b82cb226e20361
Reviewed-on: http://gerrit.cloudera.org:8080/5159
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
2 files changed, 6 insertions(+), 3 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0900ad45e07c936186e3477dd0b82cb226e20361
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>