From bbe3c679db40ddcb861e815ce9a105632229a908 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Thu, 18 Dec 2008 22:40:30 +0000 Subject: [PATCH] SOLR-930 -- log error close is already closed git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@727847 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/solr/core/SolrCore.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/solr/core/SolrCore.java b/src/java/org/apache/solr/core/SolrCore.java index b7a0c967392..b72a425f7b3 100644 --- a/src/java/org/apache/solr/core/SolrCore.java +++ b/src/java/org/apache/solr/core/SolrCore.java @@ -694,10 +694,12 @@ public final class SolrCore implements SolrInfoMBean { */ public void close() { int count = refCount.decrementAndGet(); - if (count > 0) return; + if (count > 0){ + log.warn( "Attempted close on {} did not succeed because the new reference count {} is > 0. ", this, count ); + return; + } if (count < 0) { - //throw new RuntimeException("Too many closes on " + this); - log.error("Too many close {count:"+count+"} on " + this + ". Please report this exception to solr-user@lucene.apache.org"); + log.error("Too many close [count:{}] on {}. Please report this exception to solr-user@lucene.apache.org", count, this ); return; } log.info(logid+" CLOSING SolrCore " + this);