Ethan Li created STORM-3624:
-------------------------------
Summary: Race condition on ArtifactoryConfigLoader.load
Key: STORM-3624
URL: https://issues.apache.org/jira/browse/STORM-3624
Project: Apache Storm
Issue Type: Bug
Reporter: Ethan Li
https://github.com/apache/storm/blob/master/storm-server/src/main/java/org/apache/storm/scheduler/resource/ResourceAwareScheduler.java#L100-L102
config() is called in multiple threads. But ArtifactoryConfigLoader.load is not
thread-safe. For example,
https://github.com/apache/storm/blob/master/storm-server/src/main/java/org/apache/storm/scheduler/utils/ArtifactoryConfigLoader.java#L181-L187
{code:java}
JSONObject returnValue;
try {
returnValue = (JSONObject) jsonParser.parse(metadataStr);
} catch (ParseException e) {
LOG.error("Could not parse JSON string {}", metadataStr, e);
return null;
}
{code}
Multiple threads use the same jsonParser and since JsonParser is not
thread-safe, the return value will be corrupted.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)