You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by srdo <gi...@git.apache.org> on 2018/09/11 20:14:22 UTC

[GitHub] storm issue #2800: STORM-3162: Fix concurrent modification bug

Github user srdo commented on the issue:

    https://github.com/apache/storm/pull/2800
  
    @zd-project I'd like to finish this up. Let me know if you want to make the last couple of fixes, otherwise I'll open a new PR containing this fix.
    
    @danny0405 I thought about it a bit more, and while I still think we can fix this by making `updateHeartbeatCache` thread safe by making it return a new map and keeping the pre-this-PR AtomicReference in Nimbus, I'm not sure why this would be faster than just using a ConcurrentHashMap like the current PR code here does? Using the AtomicReference in Nimbus essentially makes the heartbeat cache a copy-on-write Map due to the way we do updates via Assoc and Dissoc. I would expect a ConcurrentHashMap to provide better parallelism. What do you think?


---