You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/12/05 04:52:58 UTC

[2/2] kudu git commit: ts_recovery-itest: reduce test flakiness

ts_recovery-itest: reduce test flakiness

In the flaky test dashboard, this test case was flaky in two cases:

1) in TSAN builds sometimes it wouldn't write fast enough to trigger
lots of rolls. In that case, the "wait for crash in 60 seconds" might
not trigger.

2) In DEBUG builds, sometimes the 50% chance of crashes allowed it to
write 10+ segments before crashing (0.5^10 = 1/1000 times). With this
many log segments, the bootstrap could take long enough that the
verification on restart would time out.

This addresses the issue by (a) writing larger ops, so that logs would
roll quicker with fewer ops required, and (b) increasing the crash
probability so that it needs fewer rolls to crash on average.

Change-Id: I4d5018636d20a4663e84071e91f573b86e309a29
Reviewed-on: http://gerrit.cloudera.org:8080/5351
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/47c25cea
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/47c25cea
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/47c25cea

Branch: refs/heads/master
Commit: 47c25ceae1ad2a35bc30bfa94dc16d88c1a10035
Parents: f0c27b5
Author: Todd Lipcon <to...@apache.org>
Authored: Sat Dec 3 21:16:34 2016 -0800
Committer: Todd Lipcon <to...@apache.org>
Committed: Mon Dec 5 04:51:45 2016 +0000

----------------------------------------------------------------------
 src/kudu/integration-tests/ts_recovery-itest.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/47c25cea/src/kudu/integration-tests/ts_recovery-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/ts_recovery-itest.cc b/src/kudu/integration-tests/ts_recovery-itest.cc
index ec20120..8ab57d1 100644
--- a/src/kudu/integration-tests/ts_recovery-itest.cc
+++ b/src/kudu/integration-tests/ts_recovery-itest.cc
@@ -204,12 +204,13 @@ TEST_F(TsRecoveryITest, TestCrashBeforeWriteLogSegmentHeader) {
   work.set_num_replicas(1);
   work.set_write_timeout_millis(100);
   work.set_timeout_allowed(true);
+  work.set_payload_bytes(10000); // make logs roll without needing lots of ops.
   work.Setup();
 
   // Enable the fault point after creating the table, but before writing any data.
   // Otherwise, we'd crash during creation of the tablet.
   ASSERT_OK(cluster_->SetFlag(cluster_->tablet_server(0),
-                              "fault_crash_before_write_log_segment_header", "0.5"));
+                              "fault_crash_before_write_log_segment_header", "0.9"));
   work.Start();
 
   // Wait for the process to crash during log roll.