[ https://issues.apache.org/jira/browse/SOLR-9208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15374718#comment-15374718 ]
Fabrizio Fortino commented on SOLR-9208: ---------------------------------------- [~mkhludnev] I am pretty sure this can't happen. Let me give some additional details of what I am trying to do. I have created a Solr CoreAdminHandler extension with the goal to swap two cores and remove the old one. My code looks like this: {code:java} SolrCore core = coreContainer.create("newcore", coreProps) coreContainer.swap("newcore", "livecore") // the old livecore is now newcore, so unload it and remove all the related dirs coreContainer.unload("newcore", true, true, true) {code} This unfortunately does not work. I have opened an issue but I got no answers so far (details here https://issues.apache.org/jira/browse/SOLR-8757). As a workaround, I am "manually" closing the references to the core I want to unload before unloading it. The code now looks like: {code:java} SolrCore core = coreContainer.create("newcore", coreProps) coreContainer.swap("newcore", "livecore") // the old livecore is now newcore, so unload it and remove all the related dirs SolrCore oldCore = coreContainer.getCore("newCore") while (oldCore.getOpenCount > 1) { oldCore.close() } coreContainer.unload("newcore", true, true, true) {code} > ConcurrentModificationException on SolrCore.close() resulting in abnormal CPU > consumption > ----------------------------------------------------------------------------------------- > > Key: SOLR-9208 > URL: https://issues.apache.org/jira/browse/SOLR-9208 > Project: Solr > Issue Type: Bug > Components: multicore, Server > Affects Versions: 6.0 > Reporter: Fabrizio Fortino > Assignee: Mikhail Khludnev > > In our use case we swap two cores and close the old one. We started seeing > the below error from time to time (it's completely random, we are unable to > reproduce it). Moreover we have noticed that when this Exception is thrown > the CPU consumption goes pretty high (80-100%). > Error Message: > java.util.ConcurrentModificationException: > java.util.ConcurrentModificationException > StackTrace: > java.util.ArrayList$Itr.checkForComodification (ArrayList.java:901) > java.util.ArrayList$Itr.next (ArrayList.java:851) > org.apache.solr.core.SolrCore.close (SolrCore.java:1134) > org.apache.solr.servlet.HttpSolrCall.destroy (HttpSolrCall.java:513) > org.apache.solr.servlet.SolrDispatchFilter.doFilter > (SolrDispatchFilter.java:242) > org.apache.solr.servlet.SolrDispatchFilter.doFilter > (SolrDispatchFilter.java:184) > …ipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) > org.eclipse.jetty.servlet.ServletHandler.doHandle (ServletHandler.java:581) > org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:143) > org.eclipse.jetty.security.SecurityHandler.handle (SecurityHandler.java:548) > …g.eclipse.jetty.server.session.SessionHandler.doHandle > (SessionHandler.java:226) > …g.eclipse.jetty.server.handler.ContextHandler.doHandle > (ContextHandler.java:1160) > org.eclipse.jetty.servlet.ServletHandler.doScope (ServletHandler.java:511) > org.eclipse.jetty.server.session.SessionHandler.doScope > (SessionHandler.java:185) > org.eclipse.jetty.server.handler.ContextHandler.doScope > (ContextHandler.java:1092) > org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:141) > …e.jetty.server.handler.ContextHandlerCollection.handle > (ContextHandlerCollection.java:213) > ….eclipse.jetty.server.handler.HandlerCollection.handle > (HandlerCollection.java:119) > org.eclipse.jetty.server.handler.HandlerWrapper.handle > (HandlerWrapper.java:134) > org.eclipse.jetty.server.Server.handle (Server.java:518) > org.eclipse.jetty.server.HttpChannel.handle (HttpChannel.java:308) > org.eclipse.jetty.server.HttpConnection.onFillable (HttpConnection.java:244) > …pse.jetty.io.AbstractConnection$ReadCallback.succeeded > (AbstractConnection.java:273) > org.eclipse.jetty.io.FillInterest.fillable (FillInterest.java:95) > org.eclipse.jetty.io.SelectChannelEndPoint$2.run > (SelectChannelEndPoint.java:93) > …il.thread.strategy.ExecuteProduceConsume.produceAndRun > (ExecuteProduceConsume.java:246) > …e.jetty.util.thread.strategy.ExecuteProduceConsume.run > (ExecuteProduceConsume.java:156) > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob > (QueuedThreadPool.java:654) > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run > (QueuedThreadPool.java:572) > java.lang.Thread.run (Thread.java:745) -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org