You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Mikhail Khludnev (Jira)" <ji...@apache.org> on 2021/10/26 21:15:00 UTC

[jira] [Comment Edited] (SOLR-15635) {!join} under /export closes core

    [ https://issues.apache.org/jira/browse/SOLR-15635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17434574#comment-17434574 ] 

Mikhail Khludnev edited comment on SOLR-15635 at 10/26/21, 9:14 PM:
--------------------------------------------------------------------

Ok. Got it. 
# -Old- classic join opens fromCore in constructor and hangs a close hook. 
# {{/export}} kicks off ExportBuffer thread that somehow leaks {{SolrRequestInfo}} in those threads. Something about logging context or so. 
# then stopping ExportBuffer closes {{SolrRequestInfo}} in addition to regular request handling
# {{SolrRequestInfo}} executes closeHooks as many as one closes it 
# it closes fromCore twice 

Fix is attached. It's worth to test double close for {{SolrRequestInfo}} explicitly. 


was (Author: mkhludnev):
Ok. Got it. 
# -Old- classic join opens fromCore in constructor and hangs a close hook. 
# {{/export}} kicks off ExportBuffer thread that somehow leaks {{SolrRequestInfo}} in those threads. Something about logging context or so. 
# then stopping ExportBuffer closes {{SolrRequestInfo}} in addition to regular request handling
# {{SolrRequestInfo}} executes closeHooks as many as one closes it 
# it closes fromCore twice 
Fix is attached. It's worth to test double close for {{SolrRequestInfo}} explicitly. 

> {!join} under /export closes core
> ---------------------------------
>
>                 Key: SOLR-15635
>                 URL: https://issues.apache.org/jira/browse/SOLR-15635
>             Project: Solr
>          Issue Type: Bug
>          Components: Export Writer, query parsers
>    Affects Versions: 8.9
>         Environment: * 2x solr nodes (12cpu, 40Gb, 300gb hdd)
>  * solr heap: 30Gb
>  * index size: ~60Gb per node
>  * docs count: ~1M
>  
>            Reporter: Roman Voronin
>            Assignee: Mikhail Khludnev
>            Priority: Major
>         Attachments: SOLR-15635.patch, SOLR-15635.patch, err1.log, err2.log
>
>
> Hello,
> When I executing an export query, sometimes I get the error:
> {code:java}
> [c:text s:shard1 r:core_node3 x:text_shard1_replica_n1] o.a.s.c.SolrCore java.lang.IllegalArgumentException: Unknown directory: NRTCachingDirectory(MMapDirectory@/var/solrhome/workset_9ce130e7-eee0-4d7b-be71-e22d54c55f81_shard1_replica_n1/data/snapshot_metadata lockFactory=org.apache.lucene.store.NativeFSLockFactory@21d64083; maxCacheMB=48.0 maxMergeSizeMB=4.0) {}[c:text s:shard1 r:core_node3 x:text_shard1_replica_n1] o.a.s.c.SolrCore java.lang.IllegalArgumentException: Unknown directory: NRTCachingDirectory(MMapDirectory@/var/solrhome/workset_9ce130e7-eee0-4d7b-be71-e22d54c55f81_shard1_replica_n1/data/snapshot_metadata lockFactory=org.apache.lucene.store.NativeFSLockFactory@21d64083; maxCacheMB=48.0 maxMergeSizeMB=4.0) {} at org.apache.solr.core.CachingDirectoryFactory.release(CachingDirectoryFactory.java:441) at org.apache.solr.core.SolrCore.close(SolrCore.java:1684) at org.apache.solr.search.JoinQParserPlugin$Method.parseJoin(JoinQParserPlugin.java:191) at org.apache.solr.search.JoinQParserPlugin$Method$1.makeFilter(JoinQParserPlugin.java:98) at org.apache.solr.search.JoinQParserPlugin$1.parse(JoinQParserPlugin.java:237) at org.apache.solr.search.QParser.getQuery(QParser.java:174) at org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:1080) at org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:551) at org.apache.solr.parser.SolrQueryParserBase.handleQuotedTerm(SolrQueryParserBase.java:8
> {code}
> After that, working with the "Unknown" collection is impossible until solr restarts. A few words about my queries - all of them consist of "fq" with \{!join from=...} and "q" of different complexity. In my experience, the complexity of "q" doesn't affect this error.
> The exception happens only when using export, with /select handler same query works well. Seems using export + query with join sometimes causes a bug.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org