You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2025/05/18 13:26:49 UTC

(lucene) branch main updated: tests: decrease maximum number of threads in seq number test to avoid OOM (#14670)

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new 009cf7d6e8b tests: decrease maximum number of threads in seq number test to avoid OOM (#14670)
009cf7d6e8b is described below

commit 009cf7d6e8bc3615ae55048cf8892569bf6b753e
Author: Robert Muir <rm...@apache.org>
AuthorDate: Sun May 18 09:26:43 2025 -0400

    tests: decrease maximum number of threads in seq number test to avoid OOM (#14670)
    
    These nightly tests may use a large amount of threads, which multiplies
    the workload. In general for the concurrency tests, a small number of
    threads should be enough, large numbers of threads probably just find
    more resource issues rather than bang for the buck.
---
 .../test/org/apache/lucene/index/TestIndexingSequenceNumbers.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexingSequenceNumbers.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexingSequenceNumbers.java
index 66d24d6b942..58889a6312f 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexingSequenceNumbers.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexingSequenceNumbers.java
@@ -78,7 +78,7 @@ public class TestIndexingSequenceNumbers extends LuceneTestCase {
     for (int iter = 0; iter < iters; iter++) {
       Directory dir = newDirectory();
       final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
-      Thread[] threads = new Thread[TestUtil.nextInt(random(), 2, 5)];
+      Thread[] threads = new Thread[TestUtil.nextInt(random(), 2, 4)];
       final CountDownLatch startingGun = new CountDownLatch(1);
       final long[] seqNos = new long[threads.length];
       final Term id = new Term("id", "id");
@@ -156,7 +156,7 @@ public class TestIndexingSequenceNumbers extends LuceneTestCase {
     // Cannot use RIW since it randomly commits:
     final IndexWriter w = new IndexWriter(dir, iwc);
 
-    final int numThreads = TestUtil.nextInt(random(), 2, 10);
+    final int numThreads = TestUtil.nextInt(random(), 2, 4);
     Thread[] threads = new Thread[numThreads];
     // System.out.println("TEST: iter=" + iter + " opCount=" + opCount + " idCount=" + idCount + "
     // threadCount=" + threads.length);
@@ -353,7 +353,7 @@ public class TestIndexingSequenceNumbers extends LuceneTestCase {
     // Cannot use RIW since it randomly commits:
     final IndexWriter w = new IndexWriter(dir, iwc);
 
-    final int numThreads = TestUtil.nextInt(random(), 2, 10);
+    final int numThreads = TestUtil.nextInt(random(), 2, 4);
     if (VERBOSE) {
       System.out.println("TEST: numThreads=" + numThreads);
     }
@@ -538,7 +538,7 @@ public class TestIndexingSequenceNumbers extends LuceneTestCase {
     // Cannot use RIW since it randomly commits:
     final IndexWriter w = new IndexWriter(dir, iwc);
 
-    final int numThreads = TestUtil.nextInt(random(), 2, 5);
+    final int numThreads = TestUtil.nextInt(random(), 2, 4);
     Thread[] threads = new Thread[numThreads];
     // System.out.println("TEST: iter=" + iter + " opCount=" + opCount + " idCount=" + idCount + "
     // threadCount=" + threads.length);