Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 449D9200D1E for ; Wed, 18 Oct 2017 13:49:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 433AC160BEA; Wed, 18 Oct 2017 11:49:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 899F01609EE for ; Wed, 18 Oct 2017 13:49:07 +0200 (CEST) Received: (qmail 9622 invoked by uid 500); 18 Oct 2017 11:49:06 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 9611 invoked by uid 99); 18 Oct 2017 11:49:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2017 11:49:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B98C31806C0 for ; Wed, 18 Oct 2017 11:49:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id pcwv0nwfchuQ for ; Wed, 18 Oct 2017 11:49:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 403CE5FBE2 for ; Wed, 18 Oct 2017 11:49:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 77276E0D63 for ; Wed, 18 Oct 2017 11:49:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 248F62438E for ; Wed, 18 Oct 2017 11:49:00 +0000 (UTC) Date: Wed, 18 Oct 2017 11:49:00 +0000 (UTC) From: =?utf-8?Q?Andr=C3=A9s_de_la_Pe=C3=B1a_=28JIRA=29?= To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13963) SecondaryIndexManagerTest.indexWithfailedInitializationIsNotQueryableAfterPartialRebuild is flaky MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 18 Oct 2017 11:49:08 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13963?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16209191#comment-16209191 ]=20 Andr=C3=A9s de la Pe=C3=B1a commented on CASSANDRA-13963: ----------------------------------------------- [Here|https://github.com/apache/cassandra/compare/trunk...adelapena:13963-t= runk] is a patch solving the problem. It seems that the call to [{{TestingIndex.shouldFailCreate =3D false;}}|htt= ps://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/= index/SecondaryIndexManagerTest.java#L466] is done right after creating the= index configured to fail, without waiting for the finalization of the buil= d task. If we are not lucky the index initalization task can start after di= sabling the configured fail. In such case, the two calls to {{assertFalse(c= fs.indexManager.isIndexQueryable(index))}} can either succeed because the i= ndex build task hasn't started yet (not because it has failed), or fail bec= ause the task has successfully finished without the configured initializati= on task failure. The unit tests usually use [{{CQLTester.waitForIndex}}|https://github.com/a= pache/cassandra/blob/trunk/test/unit/org/apache/cassandra/cql3/CQLTester.ja= va#L709-L737] method to wait for the finalization of index builds. In that = case, since we are making the initialization to fail, we can't rely on this= method, so the patch adds a new [{{CQLTester.waitForIndexBuilds}}|https://= github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/cql3/= CQLTester.java#L709-L737] method to wait for the finalization of index buil= d tasks independently of their results and the marking procedure. This meth= od is in {{CQLTester}} instead of {{SecondaryIndexManagerTest}} because I t= hink it's suitable to be used by other tests.=20 > SecondaryIndexManagerTest.indexWithfailedInitializationIsNotQueryableAfte= rPartialRebuild is flaky > -------------------------------------------------------------------------= ------------------------ > > Key: CASSANDRA-13963 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1396= 3 > Project: Cassandra > Issue Type: Bug > Components: Secondary Indexes, Testing > Reporter: Andr=C3=A9s de la Pe=C3=B1a > Assignee: Andr=C3=A9s de la Pe=C3=B1a > Priority: Minor > Fix For: 4.x > > > The unit test [SecondaryIndexManagerTest.indexWithfailedInitializationIsN= otQueryableAfterPartialRebuild|https://github.com/apache/cassandra/blob/tru= nk/test/unit/org/apache/cassandra/index/SecondaryIndexManagerTest.java#L460= -L476] is flaky. Apart from [the CI results showing a 3% flakiness|http://c= assci.datastax.com/view/All_Jobs/job/trunk_utest/2430/testReport/org.apache= .cassandra.index/SecondaryIndexManagerTest/indexWithfailedInitializationIsN= otQueryableAfterPartialRebuild/], the test failure can be locally reproduce= d just running the test multiple times. In my case, it fails 2-5 times for = each 1000 executions. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org