From commits-return-7779-archive-asf-public=cust-asf.ponee.io@kudu.apache.org Sat Aug 24 00:59:11 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E9E64180680 for ; Sat, 24 Aug 2019 02:59:10 +0200 (CEST) Received: (qmail 85658 invoked by uid 500); 24 Aug 2019 00:59:10 -0000 Mailing-List: contact commits-help@kudu.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kudu.apache.org Delivered-To: mailing list commits@kudu.apache.org Received: (qmail 85492 invoked by uid 99); 24 Aug 2019 00:59:09 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Aug 2019 00:59:09 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id A25D885FBE; Sat, 24 Aug 2019 00:59:09 +0000 (UTC) Date: Sat, 24 Aug 2019 00:59:14 +0000 To: "commits@kudu.apache.org" Subject: [kudu] 05/05: test: deflake ksck_remote-test TestChecksumSnapshotCurrentTimestamp MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: awong@apache.org In-Reply-To: <156660834948.21447.1990007260795622105@gitbox.apache.org> References: <156660834948.21447.1990007260795622105@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: kudu X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 8af4883be0d49d4fe69ef697345d1feee799c935 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190824005909.A25D885FBE@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. awong pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git commit 8af4883be0d49d4fe69ef697345d1feee799c935 Author: Andrew Wong AuthorDate: Fri Jul 19 19:11:40 2019 -0700 test: deflake ksck_remote-test TestChecksumSnapshotCurrentTimestamp I saw a failure of the test with the following error: W0720 00:44:31.890009 4561 tablet_service.cc:2357] Rejecting scan request for tablet 9542a9eebae84c1b993235a309c866d0: Uninitialized: safe time has not yet been initialized /data0/jenkins/workspace/kudu-pre-commit-unittest-ASAN/src/kudu/tools/ksck_remote-test.cc:451: Failure Failed Bad status: Aborted: 1 errors were detected This patch wraps the checksum with an ASSERT_EVENTUALLY, since the scan should eventually pass once a leader is elected or writes succeed. Change-Id: I51aeaebca599697e444b244ae15259dea4dbe949 Reviewed-on: http://gerrit.cloudera.org:8080/13887 Tested-by: Kudu Jenkins Reviewed-by: Hao Hao --- src/kudu/tools/ksck_remote-test.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/kudu/tools/ksck_remote-test.cc b/src/kudu/tools/ksck_remote-test.cc index ba4328a..a64e268 100644 --- a/src/kudu/tools/ksck_remote-test.cc +++ b/src/kudu/tools/ksck_remote-test.cc @@ -445,10 +445,14 @@ TEST_F(RemoteKsckTest, TestChecksumSnapshotCurrentTimestamp) { ASSERT_OK(ksck_->CheckClusterRunning()); ASSERT_OK(ksck_->FetchTableAndTabletInfo()); ASSERT_OK(ksck_->FetchInfoFromTabletServers()); - ASSERT_OK(ksck_->ChecksumData(KsckChecksumOptions(MonoDelta::FromSeconds(10), - MonoDelta::FromSeconds(10), - 16, true, - KsckChecksumOptions::kCurrentTimestamp))); + // It's possible for scans to fail because the tablets haven't been written + // to yet and haven't elected a leader. + ASSERT_EVENTUALLY([&] { + ASSERT_OK(ksck_->ChecksumData(KsckChecksumOptions(MonoDelta::FromSeconds(10), + MonoDelta::FromSeconds(10), + 16, true, + KsckChecksumOptions::kCurrentTimestamp))); + }); } ASSERT_OK(promise.Get()); }