MCPcopy Create free account
hub / github.com/apache/solr / doClose

Method doClose

solr/core/src/java/org/apache/solr/core/SolrCore.java:1776–1930  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1774 }
1775 }
1776 }
1777
1778 if (reqHandlers != null) reqHandlers.close();
1779 responseWriters.close();
1780 searchComponents.close();
1781 qParserPlugins.close();
1782 valueSourceParsers.close();
1783 transformerFactories.close();
1784
1785 try {
1786 if (null != updateHandler) {
1787 updateHandler.close();
1788 }
1789 } catch (Throwable e) {
1790 log.error("Exception closing updateHandler", e);
1791 if (e instanceof Error) {
1792 throw (Error) e;
1793 }
1794 }
1795
1796 boolean coreStateClosed = false;
1797 try {
1798 if (solrCoreState != null) {
1799 if (updateHandler instanceof IndexWriterCloser) {
1800 coreStateClosed = solrCoreState.decrefSolrCoreState((IndexWriterCloser) updateHandler);
1801 } else {
1802 coreStateClosed = solrCoreState.decrefSolrCoreState(null);
1803 }
1804 }
1805 } catch (Throwable e) {
1806 log.error("Exception calling decrefSolrCoreState", e);
1807 if (e instanceof Error) {
1808 throw (Error) e;
1809 }
1810 }
1811
1812 try {
1813 ExecutorUtil.shutdownAndAwaitTermination(searcherExecutor);
1814 } catch (Throwable e) {
1815 log.error("Exception shutting down searcherExecutor", e);
1816 if (e instanceof Error) {
1817 throw (Error) e;
1818 }
1819 }
1820 assert ObjectReleaseTracker.release(searcherExecutor);
1821
1822 try {
1823 // Since we waited for the searcherExecutor to shut down,
1824 // there should be no more searchers warming in the background
1825 // that we need to take care of.
1826 //
1827 // For the case that a searcher was registered *before* warming
1828 // then the searchExecutor will throw an exception when getSearcher()
1829 // tries to use it, and the exception handling code should close it.
1830 closeSearcher();
1831 } catch (Throwable e) {
1832 log.error("Exception closingSearcher", e);
1833 if (e instanceof Error) {

Callers 1

closeMethod · 0.95

Calls 14

releaseMethod · 0.95
closeSearcherMethod · 0.95
decrefSolrCoreStateMethod · 0.80
getSnapshotsDirMethod · 0.80
closeMethod · 0.65
preCloseMethod · 0.65
clearMethod · 0.65
releaseMethod · 0.65
postCloseMethod · 0.65

Tested by

no test coverage detected