----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61781/#review183451 -----------------------------------------------------------
Fix it, then Ship it! ambari-agent/src/main/python/ambari_agent/ClusterCache.py Lines 57-62 (original), 58-68 (patched) <https://reviews.apache.org/r/61781/#comment259452> It is possible to have a writer write out cache contents between reading the json and hash files. To prevent this, both reads should be guarded by the same acquisition of `__file_lock`, ie. move `with self.__file_lock` to the outermost level, the same way as it is in `persist_cache`. - Attila Doroszlai On Aug. 21, 2017, 6:28 p.m., Andrew Onischuk wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61781/ > ----------------------------------------------------------- > > (Updated Aug. 21, 2017, 6:28 p.m.) > > > Review request for Ambari, Attila Doroszlai, Dmytro Sen, Myroslav > Papirkovskyy, and Sid Wagle. > > > Bugs: AMBARI-21763 > https://issues.apache.org/jira/browse/AMBARI-21763 > > > Repository: ambari > > > Description > ------- > > . > > > Diffs > ----- > > ambari-agent/src/main/python/ambari_agent/AlertStatusReporter.py 20cb717 > ambari-agent/src/main/python/ambari_agent/ClusterAlertDefinitionsCache.py > a1f7199 > ambari-agent/src/main/python/ambari_agent/ClusterCache.py 2316866 > ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py 559a956 > ambari-agent/src/main/python/ambari_agent/CommandStatusDict.py e7b7e49 > ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py > 66df15a > ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py c60ea36 > ambari-agent/src/main/python/ambari_agent/InitializerModule.py 8208b32 > > ambari-agent/src/main/python/ambari_agent/listeners/AlertDefinitionsEventListener.py > cf72a4d > > ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py > e32c503 > > ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py > aee2992 > > ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py > 1e9b6e7 > > ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py > 19a1d32 > ambari-agent/src/main/python/ambari_agent/security.py a505658 > ambari-agent/src/test/python/ambari_agent/TestAgentStompResponses.py > 55c489f > > > Diff: https://reviews.apache.org/r/61781/diff/1/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Andrew Onischuk > >
