You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/08/31 15:45:13 UTC

[lucene-solr] branch reference_impl_dev updated: @649 Handle rare leak on thread exit.

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

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new 4d3a468  @649 Handle rare leak on thread exit.
4d3a468 is described below

commit 4d3a4685f881af762f473325b9740893472306cf
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Aug 31 10:44:50 2020 -0500

    @649 Handle rare leak on thread exit.
---
 solr/test-framework/src/java/org/apache/solr/SolrTestCase.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
index d1ddfc3..48a4775 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -589,8 +589,8 @@ public class SolrTestCase extends LuceneTestCase {
 
   private static void interrupt(Thread thread, String nameContains) {
     if ((nameContains != null && thread.getName().contains(nameContains)) || (interuptThreadWithNameContains != null && thread.getName().contains(interuptThreadWithNameContains)) ) {
-      if (thread.getState() == Thread.State.TERMINATED || thread.getState() == Thread.State.WAITING || thread.getState() == Thread.State.RUNNABLE) { // adding RUNNABLE is not idle, but we can be in
-        // processWorkerExit in this state - ideally we would check also we are in that method if RUNNABLE
+      if (thread.getState() == Thread.State.TERMINATED || thread.getState() == Thread.State.WAITING || thread.getState() == Thread.State.BLOCKED || thread.getState() == Thread.State.RUNNABLE) { // adding RUNNABLE, BLOCKED, WAITING is not ideal, but we can be in
+        // processWorkerExit in this state - ideally we would check also we are in an exit or terminate method if !TERMINATED
         log.warn("interrupt on " + thread.getName());
         thread.interrupt();
         try {