[ https://issues.apache.org/jira/browse/SOLR-13044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17526672#comment-17526672 ]
ASF subversion and git services commented on SOLR-13044: -------------------------------------------------------- Commit 760efed45321f197da86c353a51c5d48bc0a3a6e in solr's branch refs/heads/branch_9x from David Smiley [ https://gitbox.apache.org/repos/asf?p=solr.git;h=760efed4532 ] SOLR-13044: fix searcher/core close sequence (#815) > IndexFetcher.openNewSearcherAndUpdateCommitPoint can throw NPE on null > SolrCore > ------------------------------------------------------------------------------- > > Key: SOLR-13044 > URL: https://issues.apache.org/jira/browse/SOLR-13044 > Project: Solr > Issue Type: Bug > Reporter: Chris M. Hostetter > Priority: Major > Time Spent: 2h > Remaining Estimate: 0h > > While working through the logs in SOLR-13031, i observed the following... > {noformat} > [beaster] 2> 57230 ERROR (indexFetcher-193-thread-1) [ ] > o.a.s.h.ReplicationHandler Index fetch failed > :org.apache.solr.common.SolrException: Index fetch failed : > [beaster] 2> at > org.apache.solr.handler.IndexFetcher.fetchLatestIndex(IndexFetcher.java:676) > [beaster] 2> at > org.apache.solr.handler.IndexFetcher.fetchLatestIndex(IndexFetcher.java:346) > [beaster] 2> at > org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:424) > [beaster] 2> at > org.apache.solr.handler.ReplicationHandler.lambda$setupPolling$13(ReplicationHandler.java:1184) > [beaster] 2> at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > [beaster] 2> at > java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > [beaster] 2> at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > [beaster] 2> at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > [beaster] 2> at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > [beaster] 2> at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > [beaster] 2> at java.lang.Thread.run(Thread.java:748) > [beaster] 2> Caused by: java.lang.NullPointerException > [beaster] 2> at > org.apache.solr.handler.IndexFetcher.openNewSearcherAndUpdateCommitPoint(IndexFetcher.java:909) > [beaster] 2> at > org.apache.solr.handler.IndexFetcher.fetchLatestIndex(IndexFetcher.java:653) > [beaster] 2> ... 10 more > {noformat} > Which comes from this bit of code... > {code:java} > // must get the latest solrCore object because the one we have might be > closed because of a reload > // todo stop keeping solrCore around > SolrCore core = solrCore.getCoreContainer().getCore(solrCore.getName()); > try { > Future[] waitSearcher = new Future[1]; > searcher = core.getSearcher(true, true, waitSearcher, true); > if (waitSearcher[0] != null) { > try { > waitSearcher[0].get(); > } catch (InterruptedException | ExecutionException e) { > SolrException.log(log, e); > } > } > commitPoint = searcher.get().getIndexReader().getIndexCommit(); > } finally { > if (searcher != null) { > searcher.decref(); > } > core.close(); // IndexFetcher.java:909 where NPE is being thrown > } > {code} > IIUC: openNewSearcherAndUpdateCommitPoint isn't accounting for the > possibility that the the IndexFetcher is getting run before the SolrCore has > been fully initialized and regsitere with the CoreContainer and/or > after/while the SolrCore (and/or CoreContainer) is in the process of being > closed, and isn't available from > {{solrCore.getCoreContainer().getCore(String)}} -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org