[
https://issues.apache.org/jira/browse/FALCON-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954358#comment-13954358
]
Shaik Idris Ali edited comment on FALCON-352 at 3/29/14 5:45 PM:
-----------------------------------------------------------------
loadProperties -> doLoadProperties is not synchronized as the values are
populated in a loop, isn't it allows to read partially loaded key/values with
RuntimeProperties?
Also, with new instance we are starting a thread so creating a new instance
will work?
I think we should make doLoadProperties threadsafe (thread is only blocked till
all key/values are populated).
{code}
synchronized (this) {
this.clear();
for (String key : keys) {
String value = origProps.getProperty(domain + "." + key,
origProps.getProperty("*." + key));
if (value != null) {
value = ExpressionHelper.substitute(value);
LOG.debug(key + "=" + value);
put(key, value);
}
}
}
{code}
was (Author: shaik.idris):
loadProperties -> doLoadProperties is not synchronized as the values are
populated in a loop, isn't it allows to read partially loaded key/values with
RuntimeProperties?
Also, with new instance we are starting a thread so creating a new instance
will work?
I think we should make doLoadProperties threadsafe (thread is only blocked till
all key/values are populated).
{quote}
synchronized (this) {
this.clear();
for (String key : keys) {
String value = origProps.getProperty(domain + "." + key,
origProps.getProperty("*." + key));
if (value != null) {
value = ExpressionHelper.substitute(value);
LOG.debug(key + "=" + value);
put(key, value);
}
}
}
{quote}
> old properties not removed on refresh of runtime properties
> ------------------------------------------------------------
>
> Key: FALCON-352
> URL: https://issues.apache.org/jira/browse/FALCON-352
> Project: Falcon
> Issue Type: Bug
> Affects Versions: 0.5
> Environment: prod
> Reporter: Samarth Gupta
> Assignee: Shaik Idris Ali
> Labels: commons
> Attachments: FALCON-352.patch
>
>
> when runtime properties are refreshed at runtime the new modified changes are
> added , however the old properties are not removed due to which prism can
> keep sending request to deprecated servers.
--
This message was sent by Atlassian JIRA
(v6.2#6252)