Alan Wang created CASSANDRA-21851:
-------------------------------------
Summary: Fix flaky SSTableTasksTableTest.testSelectAll
Key: CASSANDRA-21851
URL: https://issues.apache.org/jira/browse/CASSANDRA-21851
Project: Apache Cassandra
Issue Type: Improvement
Reporter: Alan Wang
Assignee: Alan Wang
In rare cases, we can hit a race condition where a compaction is started off
prior to disabling auto compaction and overlaps with when we perform the
following.
{code:java}
UntypedResultSet result = execute("SELECT * FROM vts.sstable_tasks");
{code}
This causes us to observe two rows instead of one row.
By adding the following to SSTableTasksTableTest we can slow down compaction to
deterministically reproduce the flaky test.
{code:java}
@ClassRule
public static final TestRule delayStartupCompaction = (base, description) -> {
DatabaseDescriptor.daemonInitialization();
DatabaseDescriptor.setCompactionThroughputBytesPerSec(1024);
CompactionManager.instance.getRateLimiter().acquire(8 * 1024);
return base;
};
{code}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]