kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject [1/2] kudu git commit: tablet_copy-itest: fix TestMetricsResetAfterRevival pt2
Date Tue, 28 Nov 2017 18:39:31 GMT
Repository: kudu
Updated Branches:
  refs/heads/master fa65d647a -> 68fa8010d


tablet_copy-itest: fix TestMetricsResetAfterRevival pt2

b29c9373471927d3f2dfbdab03a8bd728c73d82f introduced a fix to the flaky
test such that the tablet's state is checked to be RUNNING. It did not
take into account the fact that tablet state metrics are cached, so the
tablet could still be in the process of bootstrapping, while it was
being advertized as a running tablet. As such, when run with 8 stress
threads, this failed 55/100 runs.

This patch addresses this by not caching tablet state. With this, with
stress, this passes 1000/1000 runs.

Change-Id: I06e538cc471d15447a90105a4d6ce25f5a69d2b0
Reviewed-on: http://gerrit.cloudera.org:8080/8665
Tested-by: Kudu Jenkins
Reviewed-by: Will Berkeley <wdberkeley@gmail.com>


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

Branch: refs/heads/master
Commit: 58b514d88f51cdf8924c8322226b64aa63c1159a
Parents: fa65d64
Author: Andrew Wong <awong@cloudera.com>
Authored: Tue Nov 28 08:35:38 2017 -0800
Committer: Andrew Wong <awong@cloudera.com>
Committed: Tue Nov 28 17:45:18 2017 +0000

----------------------------------------------------------------------
 src/kudu/integration-tests/tablet_copy-itest.cc | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/58b514d8/src/kudu/integration-tests/tablet_copy-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/tablet_copy-itest.cc b/src/kudu/integration-tests/tablet_copy-itest.cc
index 74ecad7..293318e 100644
--- a/src/kudu/integration-tests/tablet_copy-itest.cc
+++ b/src/kudu/integration-tests/tablet_copy-itest.cc
@@ -1745,6 +1745,10 @@ TEST_F(TabletCopyITest, TestMetricsResetAfterRevival) {
     ASSERT_OK(DeleteTablet(follower_ts, tablet_id, TABLET_DATA_TOMBSTONED, kTimeout));
   });
 
+  // Don't cache the state metrics or the below assertion won't be accurate.
+  ASSERT_OK(cluster_->SetFlag(cluster_->tablet_server(follower_index),
+            "tablet_state_walk_min_period_ms", "0"));
+
   // Wait for the tablet to be successfully bootstrapped.
   ASSERT_EVENTUALLY([&] {
     ASSERT_EQ(1, CountRunningTablets(cluster_->tablet_server(follower_index)));


Mime
View raw message