cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrés de la Peña (JIRA) <>
Subject [jira] [Commented] (CASSANDRA-13963) SecondaryIndexManagerTest.indexWithfailedInitializationIsNotQueryableAfterPartialRebuild is flaky
Date Wed, 18 Oct 2017 11:49:00 GMT


Andrés de la Peña commented on CASSANDRA-13963:

[Here|] is a patch
solving the problem.

It seems that the call to [{{TestingIndex.shouldFailCreate = false;}}|]
is done right after creating the index configured to fail, without waiting for the finalization
of the build task. If we are not lucky the index initalization task can start after disabling
the configured fail. In such case, the two calls to {{assertFalse(cfs.indexManager.isIndexQueryable(index))}}
can either succeed because the index build task hasn't started yet (not because it has failed),
or fail because the task has successfully finished without the configured initialization task

The unit tests usually use [{{CQLTester.waitForIndex}}|]
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}}|]
method to wait for the finalization of index build tasks independently of their results and
the marking procedure. This method is in {{CQLTester}} instead of {{SecondaryIndexManagerTest}}
because I think it's suitable to be used by other tests. 

> SecondaryIndexManagerTest.indexWithfailedInitializationIsNotQueryableAfterPartialRebuild
is flaky
> -------------------------------------------------------------------------------------------------
>                 Key: CASSANDRA-13963
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Secondary Indexes, Testing
>            Reporter: Andrés de la Peña
>            Assignee: Andrés de la Peña
>            Priority: Minor
>             Fix For: 4.x
> The unit test [SecondaryIndexManagerTest.indexWithfailedInitializationIsNotQueryableAfterPartialRebuild|]
is flaky. Apart from [the CI results showing a 3% flakiness|],
the test failure can be locally reproduced 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message