Jean-Daniel Cryans has submitted this change and it was merged.

Change subject: ksck: fix a test flake caused by a race on timeout
......................................................................


ksck: fix a test flake caused by a race on timeout

I saw a case where TestKsckTimeout could fail with the following
race:
- we would time out the WaitFor() which waits for all results to be received,
  thus setting 'timed_out' to true.
- immediately thereafter, the last result would be received
- after printing the results, we'd see that the number of results matched the
  number of tablets and not return the 'TimedOut' value.

This race is more likely now that we multi-thread the fetching of checksums.

The fix here is to trust the 'timed_out' boolean that comes from 'WaitFor'
rather than looking at the tablet count.

Change-Id: I1cbc68df96a9d721c7d850bb664bb4f5af2495d0
Reviewed-on: http://gerrit.cloudera.org:8080/3727
Reviewed-by: Jean-Daniel Cryans <jdcry...@apache.org>
Tested-by: Kudu Jenkins
---
M src/kudu/tools/ksck.cc
1 file changed, 8 insertions(+), 7 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cbc68df96a9d721c7d850bb664bb4f5af2495d0
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jdcry...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>

Reply via email to