[ https://issues.apache.org/jira/browse/SOLR-3118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Miller updated SOLR-3118: ------------------------------ Attachment: SOLR-3118.patch I'm not sure what the absolute best way to solve this is, but it's pretty annoying so we need to do something. Here is a patch that finds the slice name when a shard is set to "". When we don't find a shard, we simply set it's shard value to "" and propagate no info along - this patch just correlates the "" shard to it's slice name and passes it to httpshardhandler by param so no apis are changed. It seems to work fine for the SolrCloud case. Anyone else have any thoughts? > We need a better error message when failing due to a slice that is part of > collection is not available > ------------------------------------------------------------------------------------------------------ > > Key: SOLR-3118 > URL: https://issues.apache.org/jira/browse/SOLR-3118 > Project: Solr > Issue Type: Improvement > Components: SolrCloud > Affects Versions: 4.0-ALPHA > Reporter: Sami Siren > Assignee: Mark Miller > Priority: Minor > Attachments: SOLR-3118.patch > > > When indexing to/searching from an incomplete collection (for example a slice > does not have any shards registered/available) a cruel error without a proper > explanation is shown to the user. These errors are from running example1.sh > and creating a new collection with coreadminhandler: > Slices with no shards: > Indexing: > {code} > Error 500 No registered leader was found, collection:collection2 slice:shard4 > java.lang.RuntimeException: No registered leader was found, > collection:collection2 slice:shard4 > at > org.apache.solr.common.cloud.ZkStateReader.getLeaderProps(ZkStateReader.java:408) > at > org.apache.solr.common.cloud.ZkStateReader.getLeaderProps(ZkStateReader.java:393) > at > org.apache.solr.update.processor.DistributedUpdateProcessor.setupRequest(DistributedUpdateProcessor.java:154) > at > org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:210) > at > org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115) > at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:135) > at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:79) > at > org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:59) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1523) > at > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:339) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:234) > at > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) > at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) > at > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > at > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) > at > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) > at > org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) > at > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) > at > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) > at org.mortbay.jetty.Server.handle(Server.java:326) > at > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) > at > org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > at > org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) > at > org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) > {code} > Searching: > {code} > HTTP ERROR 503 > Problem accessing /solr/coreX/select/. Reason: > no servers hosting shard: > Powered by Jetty:// > {code} > Surprisingly the error is different when searching from a collection after > removing a core from an collection that was in OK condition: > {code} > HTTP ERROR 500 > Problem accessing /solr/coreX/select/. Reason: > null > java.util.concurrent.RejectedExecutionException > at > java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768) > at > java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767) > at > java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658) > at > java.util.concurrent.ExecutorCompletionService.submit(ExecutorCompletionService.java:152) > at > org.apache.solr.handler.component.HttpShardHandler.submit(HttpShardHandler.java:173) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:274) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1523) > at > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:339) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:234) > at > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) > at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) > at > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > at > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) > at > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) > at > org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) > at > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) > at > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) > at org.mortbay.jetty.Server.handle(Server.java:326) > at > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) > at > org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > at > org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) > at > org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) > {code} > In these cases we should explain the user what's wrong in more understandable > way. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org