muse-dev[bot] commented on a change in pull request #1963: URL: https://github.com/apache/lucene-solr/pull/1963#discussion_r537974169
########## File path: solr/core/src/java/org/apache/solr/core/ConfigSetService.java ########## @@ -186,6 +198,20 @@ protected NamedList loadConfigSetFlags(CoreDescriptor cd, SolrResourceLoader loa */ public abstract String configSetName(CoreDescriptor cd); + public interface ConfigResource { + + ConfigNode get() throws Exception; + + } + public static ConfigNode getParsedSchema(InputStream is, SolrResourceLoader loader, String name) throws IOException, SAXException, ParserConfigurationException { + XmlConfigFile schemaConf = null; + InputSource inputSource = new InputSource(is); + inputSource.setSystemId(SystemIdResolver.createSystemIdFromResourceName(name)); + schemaConf = new XmlConfigFile(loader, SCHEMA, inputSource, SLASH + SCHEMA + SLASH, null); + return new DataConfigNode(new DOMConfigNode(schemaConf.getDocument().getDocumentElement())); Review comment: *NULL_DEREFERENCE:* object returned by `getDocument(schemaConf)` could be null and is dereferenced at line 211. ########## File path: solr/core/src/java/org/apache/solr/schema/ManagedIndexSchemaFactory.java ########## @@ -210,7 +215,7 @@ private InputStream readSchemaLocally() { Review comment: *THREAD_SAFETY_VIOLATION:* Read/Write race. Non-private method `ManagedIndexSchemaFactory.create(...)` indirectly reads with synchronization from `this.config`. Potentially races with unsynchronized write in method `ManagedIndexSchemaFactory.create(...)`. Reporting because this access may occur on a background thread. ########## File path: solr/core/src/java/org/apache/solr/schema/ManagedIndexSchemaFactory.java ########## @@ -174,8 +175,12 @@ public ManagedIndexSchema create(String resourceName, SolrConfig config) { } InputSource inputSource = new InputSource(schemaInputStream); inputSource.setSystemId(SystemIdResolver.createSystemIdFromResourceName(loadedResource)); - schema = new ManagedIndexSchema(config, loadedResource, inputSource, isMutable, - managedSchemaResourceName, schemaZkVersion, getSchemaUpdateLock()); + try { + schema = new ManagedIndexSchema(config, loadedResource,IndexSchemaFactory.getConfigResource(configSetService, schemaInputStream, loader, managedSchemaResourceName) , isMutable, Review comment: *THREAD_SAFETY_VIOLATION:* Read/Write race. Non-private method `ManagedIndexSchemaFactory.create(...)` indirectly reads without synchronization from `configSetService.zkController.cloudManager`. Potentially races with write in method `ManagedIndexSchemaFactory.create(...)`. Reporting because this access may occur on a background thread. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org