Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1895#discussion_r170550704 --- Diff: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashMap.java --- @@ -196,11 +202,13 @@ public ConcurrentLongHashSet keysLongHashSet() { // A section is a portion of the hash map that is covered by a single @SuppressWarnings("serial") private static final class Section<V> extends StampedLock { + + private static final AtomicIntegerFieldUpdater<Section> CAPACITY_UPDATER = AtomicIntegerFieldUpdater.newUpdater(Section.class, "capacity"); private long[] keys; private V[] values; private volatile int capacity; - private volatile int size; + private int size; --- End diff -- That's not true: put and remove on Section are guarded by the same write lock
---