lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-11644) RealTimeGet not working when router.field is not an uniqeKey
Date Thu, 27 Sep 2018 17:18:00 GMT

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

Erick Erickson commented on SOLR-11644:
---------------------------------------

Ran across this looking for something else.

[~yonik@apache.org] This seems like a misunderstanding of the interplay between <uniqueKey> and
routing in general, WDYT? Should this just be closed as invalid?

Routing on one field (with duplicate values) and having a <uniqueKey> be a different
field then expecting RTG to find the document seems "fraught".

> RealTimeGet not working when router.field is not an uniqeKey
> ------------------------------------------------------------
>
>                 Key: SOLR-11644
>                 URL: https://issues.apache.org/jira/browse/SOLR-11644
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 6.6.2, 7.1
>            Reporter: Jarek Mazgaj
>            Priority: Major
>
> I have a schema with following fields:
> {code:java}
>     <field name="candidate_id" type="string" required="true"/>
>     <field name="company_id" type="string" required="true"/>
>     <field name="name" type="string"/>
>     <uniqueKey>candidate_id</uniqueKey>
> {code}
> A collection was created with following parameters:
> * numShards=4
> * replicationFactor=2
> * *router.field=company_id*
> When I try to do a Real Time Get with no routing information:
> {code:java}
> /get?id=1044101665
> {code}
> I get an empty response.
> When I try to add routing information (search returns document for these values):
> {code:java}
> /get?id=1044101665&_route_=77493783
> {code}
> I get an error:
> {code}
> org.apache.solr.common.SolrException: Can't find shard 'applicants_shard7'
> 	at org.apache.solr.handler.component.RealTimeGetComponent.sliceToShards(RealTimeGetComponent.java:888)
> 	at org.apache.solr.handler.component.RealTimeGetComponent.createSubRequests(RealTimeGetComponent.java:835)
> 	at org.apache.solr.handler.component.RealTimeGetComponent.distributedProcess(RealTimeGetComponent.java:791)
> 	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:345)
> 	at org.apache.solr.handler.RealTimeGetHandler.handleRequestBody(RealTimeGetHandler.java:46)
> 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:177)
> 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2484)
> 	at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:720)
> 	at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:526)
> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:382)
> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:326)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> 	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
> 	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> 	at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:534)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
> 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
> 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
> 	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> 	at java.lang.Thread.run(Thread.java:748)
> {code}
> In logs I can find the following line:
> {code:java}
> 2017-11-15 13:20:09.369 INFO  (qtp257895351-1305) [c:applicants s:shard9 r:core_node19
x:applicants_shard9_replica_n16] o.a.s.h.c.RealTimeGetComponent LOOKUP_SLICE:shard12=http://solr-applications1-int:8983/solr/applicants_shard12_replica_n22/
> {code}
> It seems that RealTimeGet checks the shard number for the "candidate_id" field (which
is a unique field) and it gets: *shard7* (see exception).
> It should check the shard number for the "company_id" field (set by router.field) and
then it would get the correct *shard12* (one visible in logs).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message