> On July 18, 2016, 9:35 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java,
> >  line 142
> > <https://reviews.apache.org/r/49891/diff/2/?file=1444834#file1444834line142>
> >
> >     Have you considered using a ConcurrentHashMap instead?

This map is not modified in any way. Writing and reading of 
staleConfigCacheDesiredConfigs synchronized with staleConfigCacheLock, so it 
must be safe.


On July 18, 2016, 9:35 p.m., Dmitro Lisnichenko wrote:
> > With these changes do we still need STALE_CONFIGS_CACHE_EXPIRATION_TIME ? 
> > This expiration itself was a workaround for similar/same issue.

Actually we can remove that. But this patch is aimed to fix one most possible 
reason of chache population with stale data because of parallel db sessions, 
when one modifying desiredConfigs and other one trying to read them(and getting 
non modified desiredConfigs). Pontetially we can have some other issues that we 
can catch later on, for example we will add another piece of code that 
modyfying configs, but will not invalidate chache. So i prefer to keep this.


- Eugene


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49891/#review142643
-----------------------------------------------------------


On July 15, 2016, 10:26 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49891/
> -----------------------------------------------------------
> 
> (Updated July 15, 2016, 10:26 a.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sid Wagle.
> 
> 
> Bugs: AMBARI-17651
>     https://issues.apache.org/jira/browse/AMBARI-17651
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Restart indicator is not shown after modifying the configs.
> Test case modified the hdfs config 'Namenode new generation size'. But still 
> after saving the configuration, restart icon is not shown.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/annotations/TransactionalLock.java
>  5934f5a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
>  94a8fe0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
>  d4e3828 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
> 46a3f3e 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ConfigImpl.java 
> 92ec843 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
>  fdb997b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
>  666111b 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
>  dc8017a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
>  0ff143c 
> 
> Diff: https://reviews.apache.org/r/49891/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>

Reply via email to