[ https://issues.apache.org/jira/browse/SOLR-13368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16810234#comment-16810234 ]
Andrzej Bialecki commented on SOLR-13368: ------------------------------------------ I suspect there's a race condition between upgrading from initial schema to managed schema (which involves removing {{schema.xml}}) and when the resourceName property is set in the current schema. The patch adds some synchronization around this. I'm not able to reproduce this locally, so if there are no objections I'll commit this change and we'll see how it fares on Jenkins. > SchemaManager failures when processing schema update requests > ------------------------------------------------------------- > > Key: SOLR-13368 > URL: https://issues.apache.org/jira/browse/SOLR-13368 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: 8.0, 8.1, master (9.0) > Reporter: Andrzej Bialecki > Assignee: Andrzej Bialecki > Priority: Major > Attachments: SOLR-13368.patch > > > When sending a schema update requests occasionally {{SchemaManager}} produces > this error: > {code:java} > [junit4] 2> 508295 ERROR (qtp1376110895-5901) [n:127.0.0.1:48080_solr > c:.system s:shard1 r:core_node2 x:.system_shard1_replica_n1] > o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Error > reading input String Can't find resource 'schema.xml' in classpath or > '/configs/.system', > cwd=/var/lib/jenkins/jobs/Lucene-Solr-tests-master/workspace/solr/build/solr-core/test/J5 > [junit4] 2> at > org.apache.solr.handler.SchemaHandler.handleRequestBody(SchemaHandler.java:94) > [junit4] 2> at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199) > [junit4] 2> at org.apache.solr.core.SolrCore.execute(SolrCore.java:2566) > [junit4] 2> at > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:711) > [junit4] 2> at > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:516) > [junit4] 2> at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:394) > [junit4] 2> at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:340) > [junit4] 2> at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) > [junit4] 2> at > org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:165) > [junit4] 2> at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) > [junit4] 2> at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) > [junit4] 2> at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) > [junit4] 2> at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588) > [junit4] 2> at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) > [junit4] 2> at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) > [junit4] 2> at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) > [junit4] 2> at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) > [junit4] 2> at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557) > [junit4] 2> at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) > [junit4] 2> at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) > [junit4] 2> at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) > [junit4] 2> at > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:703) > [junit4] 2> at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) > [junit4] 2> at org.eclipse.jetty.server.Server.handle(Server.java:502) > [junit4] 2> at > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364) > [junit4] 2> at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) > [junit4] 2> at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) > [junit4] 2> at > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) > [junit4] 2> at > org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) > [junit4] 2> at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) > [junit4] 2> at > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) > [junit4] 2> at java.lang.Thread.run(Thread.java:748) > [junit4] 2> Caused by: org.apache.solr.core.SolrResourceNotFoundException: > Can't find resource 'schema.xml' in classpath or '/configs/.system', > cwd=/var/lib/jenkins/jobs/Lucene-Solr-tests-master/workspace/solr/build/solr-core/test/J5 > [junit4] 2> at > org.apache.solr.cloud.ZkSolrResourceLoader.openResource(ZkSolrResourceLoader.java:130) > [junit4] 2> at > org.apache.solr.schema.SchemaManager.getFreshManagedSchema(SchemaManager.java:422) > [junit4] 2> at > org.apache.solr.schema.SchemaManager.doOperations(SchemaManager.java:105) > [junit4] 2> at > org.apache.solr.schema.SchemaManager.performOperations(SchemaManager.java:83) > [junit4] 2> at > org.apache.solr.handler.SchemaHandler.handleRequestBody(SchemaHandler.java:90) > [junit4] 2> ... 31 more > {code} > This happens for regular SolrCloud collections bootstrapped from file-based > configs. If the configuration allows schema editing thenĀ {{solr.xml}} should > be initially present in ZK, then it's replaced by {{managed-schema}} but a > backup {{solr.xml.bak}} file still exists in ZK. In this situation > {{SchemaManager}} should not complain about the missing {{solr.xml}} file. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org