wy96f commented on a change in pull request #2802: ARTEMIS-2457 implement ring queue URL: https://github.com/apache/activemq-artemis/pull/2802#discussion_r317448094
########## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java ########## @@ -3933,6 +4007,39 @@ void scheduleSlowConsumerReaper(AddressSettings settings) { } } + private void enforceRing() { + if (ringSize != -1) { // better escaping & inlining when ring isn't being used + enforceRing(null, false); + } + } + + private void enforceRing(MessageReference refToAck, boolean scheduling) { + if (getMessageCountForRing() >= ringSize) { + refToAck = refToAck == null ? messageReferences.poll() : refToAck; Review comment: If a queue is both LVQ and RING queue, when we poll ref from messageReferences, we should also remove it from LastValueQueue::map. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services