[ https://issues.apache.org/jira/browse/ARTEMIS-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16374054#comment-16374054 ]
ASF GitHub Bot commented on ARTEMIS-1664: ----------------------------------------- Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1851#discussion_r170185326 --- Diff: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashMap.java --- @@ -457,11 +459,11 @@ private void rehash() { } } - capacity = newCapacity; keys = newKeys; values = newValues; usedBuckets = size; - resizeThreshold = (int) (capacity * MapFillFactor); + capacityUpdater.lazySet(this, newCapacity); + resizeThreshold = (int) (newCapacity * MapFillFactor); --- End diff -- `capacityUpdater.lazySet` is store-releasing `keys` , `values`, `usedBuckets`, but not `resizeThreshold`: that means that the `resizeThreshold` store could be happen before the update of the `capacity`, is it correct? > fix npe bug while getting element in the process of rehash > ---------------------------------------------------------- > > Key: ARTEMIS-1664 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1664 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: Broker > Affects Versions: 2.4.0 > Reporter: yangwei > Priority: Major > Fix For: 2.5.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)