You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/12/15 19:02:00 UTC
[jira] [Commented] (ARTEMIS-4115) ArrayIndexOutOfBoundsException when duplicate cache size is 0
[ https://issues.apache.org/jira/browse/ARTEMIS-4115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17648210#comment-17648210 ]
ASF subversion and git services commented on ARTEMIS-4115:
----------------------------------------------------------
Commit cbd9f63a9d4ba003c60e53b0adc2d1a56c6d3560 in activemq-artemis's branch refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=cbd9f63a9d ]
ARTEMIS-4115 ArrayIndexOutOfBoundsException when dup cache size is 0
Allow setting id-cache-size to 0 from broker.xml and ensure the broker
handles this gracefully. Previously you could only set the cache size to
0 via broker properties or programmatically and it would throw an
ArrayIndexOutOfBoundsException when adding an item to the cache.
> ArrayIndexOutOfBoundsException when duplicate cache size is 0
> -------------------------------------------------------------
>
> Key: ARTEMIS-4115
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4115
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> When the duplicate ID cache size is set to {{0}} (e.g. via broker properties) this exception occurs when sending a message with a {{_AMQ_DUPL_ID}} header:
> {noformat}
> java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
> at org.apache.activemq.artemis.core.postoffice.impl.IntegerCache.lambda$boxedInts$0(IntegerCache.java:52)
> at org.apache.activemq.artemis.core.postoffice.impl.PersistentDuplicateIDCache.addToCacheInMemory(PersistentDuplicateIDCache.java:271)
> at org.apache.activemq.artemis.core.postoffice.impl.PersistentDuplicateIDCache.addToCache(PersistentDuplicateIDCache.java:235)
> at org.apache.activemq.artemis.core.postoffice.impl.PersistentDuplicateIDCache.addToCache(PersistentDuplicateIDCache.java:225)
> at org.apache.activemq.artemis.core.postoffice.impl.PersistentDuplicateIDCache.addToCache(PersistentDuplicateIDCache.java:202){noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)