You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Cassandra Targett (Jira)" <ji...@apache.org> on 2021/06/16 12:46:00 UTC

[jira] [Commented] (SOLR-15482) Cross-collection join when document is missing from field throws NPE

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

Cassandra Targett commented on SOLR-15482:
------------------------------------------

Full stack trace with the request:

{code}
2021-06-16 12:21:19.319 INFO  (qtp264978436-31) [c:gettingstarted s:shard1 r:core_node3 x:gettingstarted_shard1_replica_n1] o.a.s.c.S.Request [gettingstarted_shard1_replica_n1]  webapp=/solr path=/select params={df=_text_&distrib=false&fl=id&fl=score&shards.purpose=16388&start=0&fsv=true&shard.url=http://192.168.1.35:8983/solr/gettingstarted_shard1_replica_n2/|http://192.168.1.35:7574/solr/gettingstarted_shard1_replica_n1/&rows=10&rid=-0&version=2&q={!join+method%3D"crossCollection"+from%3Dmanu_id_s+to%3Dmanu_id_s+fromIndex%3Dgettingstarted}*:*&omitHeader=false&NOW=1623846079063&isShard=true&wt=javabin} status=500 QTime=116

2021-06-16 12:21:19.320 ERROR (qtp264978436-30) [c:gettingstarted s:shard2 r:core_node7 x:gettingstarted_shard2_replica_n4] o.a.s.s.HttpSolrCall java.lang.NullPointerException
	at org.apache.solr.schema.FieldType.readableToIndexed(FieldType.java:419)
	at org.apache.solr.search.join.CrossCollectionJoinQuery$TermsJoinKeyCollector.collect(CrossCollectionJoinQuery.java:133)
	at org.apache.solr.search.join.CrossCollectionJoinQuery$CrossCollectionJoinQueryWeight.getDocSet(CrossCollectionJoinQuery.java:297)
	at org.apache.solr.search.join.CrossCollectionJoinQuery$CrossCollectionJoinQueryWeight.scorer(CrossCollectionJoinQuery.java:311)
	at org.apache.lucene.search.Weight.bulkScorer(Weight.java:182)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:658)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:445)
	at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:211)
	at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1596)
	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1413)
	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:596)
	at org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1508)
	at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:398)
	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:355)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:216)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2646)
	at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:794)
	at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:567)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:427)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:357)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
	at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:335)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
	at java.base/java.lang.Thread.run(Thread.java:834)
{code}

> Cross-collection join when document is missing from field throws NPE
> --------------------------------------------------------------------
>
>                 Key: SOLR-15482
>                 URL: https://issues.apache.org/jira/browse/SOLR-15482
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: query parsers
>            Reporter: Cassandra Targett
>            Priority: Major
>
> When using {{method=crossCollection}} in a Join query, if a document does not have the field used for the {{from}} param, a NullPointerException is thrown.
> This is pretty simple to reproduce using the techproducts sample data (following assumes a clean install):
> {code}
> $ ./bin/solr start -e cloud -noprompt
> $ ./bin/post -c gettingstarted example/exampledocs/*.xml
> $ curl 'http://localhost:8983/solr/gettingstarted/select' -F 'q={!join method="crossCollection" from=manu_id_s to=manu_id_s fromIndex=gettingstarted}*:*'
> {
>   "responseHeader":{
>     "zkConnected":true,
>     "status":500,
>     "QTime":335,
>     "params":{
>       "q":"{!join method=\"crossCollection\" from=manu_id_s to=manu_id_s fromIndex=gettingstarted}*:*"}},
>   "error":{
>     "metadata":[
>       "error-class","org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException",
>       "root-error-class","org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException"],
>     "msg":"Error from server at null: java.lang.NullPointerException\n\tat org.apache.solr.schema.FieldType.readableToIndexed(FieldType.java:419)...
> {code}
> Depending on which shard the error comes from, you might see a "No live SolrServers available to handle this request" error, but digging into the logs for the other shard that served the query will show the same NPE in the example above (I'll put a full stack trace into a comment).
> "Regular" (non-cross-collection) joins work fine if some documents are missing the field.
> If we shouldn't expect XCJF to work when documents are missing the {{from}} field, then we should document that as a limitation and also throw a more descriptive error.



--
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