Github user danny0405 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2800#discussion_r212800820
--- Diff: storm-client/src/jvm/org/apache/storm/stats/StatsUtil.java ---
@@ -1565,23 +1565,26 @@ public static ComponentPageInfo aggCompExecsStats(
public static void updateHeartbeatCache(Map<List<Integer>, Map<String,
Object>> cache,
Map<List<Integer>, Map<String,
Object>> executorBeats, Set<List<Integer>> executors,
Integer timeout) {
- //if not executor beats, refresh is-timed-out of the cache which
is done by master
+ assert cache instanceof ConcurrentMap;
+ //Should we enforce update-if-newer policy?
if (executorBeats == null) {
- for (Map.Entry<List<Integer>, Map<String, Object>>
executorbeat : cache.entrySet()) {
- Map<String, Object> beat = executorbeat.getValue();
+ //If not executor beats, refresh is-timed-out of the cache
which is done by master
--- End diff --
This code branch can only be invoked by 'Nimbus' and it is always a single
thread modification, so please make sure if it will throw any
`ConcurrentModificationException`.
---