This is an automated email from the ASF dual-hosted git repository.
mck pushed a commit to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cassandra-4.0 by this push:
new b3256f5bf2 Fix the number of running trees per thread for
LongBTreeTest hanging test
b3256f5bf2 is described below
commit b3256f5bf22c99a8f5410634dd41ca1643a34c1c
Author: Maxim Muzafarov <[email protected]>
AuthorDate: Wed Mar 1 00:35:36 2023 +0100
Fix the number of running trees per thread for LongBTreeTest hanging test
patch by Maxim Muzafarov; reviewed by Mick Semb Wever for CASSANDRA-18131
---
test/burn/org/apache/cassandra/utils/LongBTreeTest.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/test/burn/org/apache/cassandra/utils/LongBTreeTest.java
b/test/burn/org/apache/cassandra/utils/LongBTreeTest.java
index 7285dd1366..aaa4e530f3 100644
--- a/test/burn/org/apache/cassandra/utils/LongBTreeTest.java
+++ b/test/burn/org/apache/cassandra/utils/LongBTreeTest.java
@@ -65,7 +65,7 @@ import static org.junit.Assert.assertTrue;
public class LongBTreeTest
{
private static final boolean DEBUG = false;
- private static int perThreadTrees = 10000;
+ private static int perThreadTrees = 10;
private static int minTreeSize = 4;
private static int maxTreeSize = 10000; // TODO randomise this for each
test
private static int threads = DEBUG ? 1 :
Runtime.getRuntime().availableProcessors() * 8;
@@ -338,7 +338,6 @@ public class LongBTreeTest
private void testRandomSelection(long seed, int perThreadTrees, int
perTreeSelections, boolean narrow, boolean mixInNotPresentItems, boolean
permitReversal, Consumer<RandomSelection> testRun) throws InterruptedException
{
final Random outerSeedGenerator = new Random(seed);
- int threads = Runtime.getRuntime().availableProcessors();
final CountDownLatch latch = new CountDownLatch(threads);
final AtomicLong errors = new AtomicLong();
final AtomicLong count = new AtomicLong();
@@ -784,7 +783,7 @@ public class LongBTreeTest
@Test
public void testIndividualInsertsMediumSparseRange() throws
ExecutionException, InterruptedException
{
- testInsertions(randomSeed(), perThreadTrees / 10, 500, 10, 1, true);
+ testInsertions(randomSeed(), 500, 10, 1, true);
}
@Test
@@ -796,17 +795,17 @@ public class LongBTreeTest
@Test
public void testLargeBatchesLargeRange() throws ExecutionException,
InterruptedException
{
- testInsertions(randomSeed(), perThreadTrees / 10,
Math.max(maxTreeSize, 5000), 3, 100, true);
+ testInsertions(randomSeed(), Math.max(maxTreeSize, 5000), 3, 100,
true);
}
@Test
public void testRandomRangeAndBatches() throws ExecutionException,
InterruptedException
{
Random seedGenerator = new Random(randomSeed());
- for (int i = 0 ; i < perThreadTrees / 10 ; i++)
+ for (int i = 0 ; i < 10 ; i++)
{
int treeSize = nextInt(seedGenerator, maxTreeSize / 10,
maxTreeSize * 10);
- testInsertions(seedGenerator.nextLong(), threads * 10, treeSize,
nextInt(seedGenerator, 1, 100) / 10f, treeSize / 100, true);
+ testInsertions(seedGenerator.nextLong(), treeSize,
nextInt(seedGenerator, 1, 100) / 10f, treeSize / 100, true);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]