[ https://issues.apache.org/jira/browse/ARTEMIS-4765?focusedWorklogId=918580&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-918580 ]
ASF GitHub Bot logged work on ARTEMIS-4765: ------------------------------------------- Author: ASF GitHub Bot Created on: 09/May/24 17:30 Start Date: 09/May/24 17:30 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4928: URL: https://github.com/apache/activemq-artemis/pull/4928#discussion_r1595763408 ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java: ########## @@ -1467,6 +1476,22 @@ public DuplicateIDCache getDuplicateIDCache(final SimpleString address, int cach return cache; } + private void registerCacheSize(SimpleString address, int cacheSizeToUse) { + AbstractPersistedAddressSetting recordedSetting = storageManager.recoverAddressSettings(address); + if (recordedSetting == null || recordedSetting.getSetting().getIDCacheSize() == null || recordedSetting.getSetting().getIDCacheSize().intValue() != cacheSizeToUse) { + AddressSettings settings = recordedSetting != null ? recordedSetting.getSetting() : new AddressSettings(); + settings.setIDCacheSize(cacheSizeToUse); + server.getAddressSettingsRepository().addMatch(address.toString(), settings); + try { + storageManager.storeAddressSetting(new PersistedAddressSettingJSON(address, settings, settings.toJSON())); + } catch (Exception e) { + // nothing could be done here, we just log + // if an exception is happening, if IO is compromised the server will eventually shutdown + logger.warn(e.getMessage(), e); Review Comment: I'm adding a loggerID.. thanks Issue Time Tracking ------------------- Worklog Id: (was: 918580) Time Spent: 50m (was: 40m) > Target Mirror is setting wrong size on duplicate cache > ------------------------------------------------------ > > Key: ARTEMIS-4765 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4765 > Project: ActiveMQ Artemis > Issue Type: Bug > Affects Versions: 2.33.0 > Reporter: Clebert Suconic > Assignee: Clebert Suconic > Priority: Major > Fix For: 2.34.0 > > Time Spent: 50m > Remaining Estimate: 0h > > Duplicate cache on Mirror target is keeping 20_000 records, even if it's only > supposed to keep 1000 due to AMQP credits. > a Workaround is to set the addressSettings.#.iDCacheSize=1000 -- This message was sent by Atlassian Jira (v8.20.10#820010)