s1monw commented on a change in pull request #1443:
URL: https://github.com/apache/lucene-solr/pull/1443#discussion_r412930075



##########
File path: 
lucene/core/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
##########
@@ -657,4 +659,88 @@ protected void doStall() {
 
     assertFalse(failed.get());
   }
+
+  /*
+   * This test tries to produce 2 merges running concurrently with 2 segments 
per merge. While these
+   * merges run we kick off a forceMerge that puts a pending merge in the 
queue but waits for things to happen.
+   * While we do this we reduce maxMergeCount to 1. If concurrency in CMS is 
not right the forceMerge will wait forever
+   * since non of the currently running merges picks up the pending merge. 
This test fails every
+   */
+  public void testChangeMaxMergeCountyWhileForceMerge() throws IOException, 
InterruptedException {
+    int numIters = TEST_NIGHTLY ? 100 : 10;
+    for (int iters = 0; iters < numIters; iters++) {
+      LogDocMergePolicy mp = new LogDocMergePolicy();
+      mp.setMergeFactor(2);
+      CountDownLatch forceMergeWaits = new CountDownLatch(1);
+      CountDownLatch mergeThreadsStartAfterWait = new CountDownLatch(1);
+      CountDownLatch mergeThreadsArrived = new CountDownLatch(2);
+      InfoStream stream = new InfoStream() {
+        @Override
+        public void message(String component, String message) {

Review comment:
       yeah I take whatever I get in these cases :D




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to