lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <m...@apache.org>
Subject Re: Solr 7.6 JoinQueryParser with Muti Threaded Facet stops solr core with Exceptions
Date Thu, 22 Aug 2019 10:33:40 GMT
This case is worth to be covered with test. Beside of that, if join is
executed in multiple threads it might make bigger footprint that gain from
employing threads. Does it make and impact for consequent searches?

On Thu, Aug 22, 2019 at 8:42 AM harjagsbby <hareesh.jagannathan@bestbuy.com>
wrote:

> Few deatils added.
>
> public void close() {
>     int count = refCount.decrementAndGet();
>     if (count > 0) return; // close is called often, and only actually
> closes if nothing is using it.
>     if (count < 0) {
>       log.error("Too many close [count:{}] on {}. Please report this
> exception to solr-user@lucene.apache.org", count, this );
>       assert false : "Too many closes on SolrCore";
>       return;
>     }
>     log.info("{} CLOSING SolrCore {}", logid, this);
>
>     // stop reporting metrics
>     try {
>       coreMetricManager.close();
>     } catch (Throwable e) {
>       SolrException.log(log, e);
>       if (e instanceof  Error) {
>         throw (Error) e;
>       }
>     }}
>
> The above code has refCount in SolrCore.java this atomicRef is in negative
> when we do multi threaded facets and joins.
>
> Can anyone explain the semaphore implemenattion here. What would be
> scenario
> when this can go below 0. I can clearly see each thread of multithreaded
> facet trying to close the core.
>
> Every Thread of facet tries to call createWeight of JoinQParserPlugin and
> attaches closeHooks which getscalled from
> SolrRequestInfo.clearRequestInfo()
> .
>
> if (fromRef != null) {
>           final RefCounted<SolrIndexSearcher> ref = fromRef;
>           info.addCloseHook(new Closeable() {
>             @Override
>             public void close() {
>               ref.decref();
>             }
>           });
>         }
>
>         info.addCloseHook(new Closeable() {
>           @Override
>           public void close() {
>             fromCore.close();
>           }
>         });
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


-- 
Sincerely yours
Mikhail Khludnev

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message