[jira] [Work logged] (ARTEMIS-4765) Target Mirror is setting wrong size on duplicate cache
[ https://issues.apache.org/jira/browse/ARTEMIS-4765?focusedWorklogId=918589=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-918589 ] ASF GitHub Bot logged work on ARTEMIS-4765: --- Author: ASF GitHub Bot Created on: 09/May/24 19:02 Start Date: 09/May/24 19:02 Worklog Time Spent: 10m Work Description: clebertsuconic merged PR #4928: URL: https://github.com/apache/activemq-artemis/pull/4928 Issue Time Tracking --- Worklog Id: (was: 918589) Time Spent: 1h (was: 50m) > 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: 1h > 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)
[jira] [Work logged] (ARTEMIS-4765) Target Mirror is setting wrong size on duplicate cache
[ https://issues.apache.org/jira/browse/ARTEMIS-4765?focusedWorklogId=918580=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)
[jira] [Work logged] (ARTEMIS-4765) Target Mirror is setting wrong size on duplicate cache
[ https://issues.apache.org/jira/browse/ARTEMIS-4765?focusedWorklogId=918525=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-918525 ] ASF GitHub Bot logged work on ARTEMIS-4765: --- Author: ASF GitHub Bot Created on: 09/May/24 11:29 Start Date: 09/May/24 11:29 Worklog Time Spent: 10m Work Description: gtully commented on code in PR #4928: URL: https://github.com/apache/activemq-artemis/pull/4928#discussion_r1595327380 ## 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: better say what the context here is, "error storing an address setting, reason: " + e.getMessage() Issue Time Tracking --- Worklog Id: (was: 918525) Time Spent: 40m (was: 0.5h) > 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: 40m > 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)
[jira] [Work logged] (ARTEMIS-4765) Target Mirror is setting wrong size on duplicate cache
[ https://issues.apache.org/jira/browse/ARTEMIS-4765?focusedWorklogId=918391=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-918391 ] ASF GitHub Bot logged work on ARTEMIS-4765: --- Author: ASF GitHub Bot Created on: 08/May/24 17:03 Start Date: 08/May/24 17:03 Worklog Time Spent: 10m Work Description: clebertsuconic opened a new pull request, #4928: URL: https://github.com/apache/activemq-artemis/pull/4928 in this commit I'm storing a binding record with the address-settings for the correct size this is also validating eventual merges of the AddressSettings in the same namespace. Issue Time Tracking --- Worklog Id: (was: 918391) Time Spent: 0.5h (was: 20m) > 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: 0.5h > 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)
[jira] [Work logged] (ARTEMIS-4765) Target Mirror is setting wrong size on duplicate cache
[ https://issues.apache.org/jira/browse/ARTEMIS-4765?focusedWorklogId=918218=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-918218 ] ASF GitHub Bot logged work on ARTEMIS-4765: --- Author: ASF GitHub Bot Created on: 08/May/24 00:42 Start Date: 08/May/24 00:42 Worklog Time Spent: 10m Work Description: clebertsuconic merged PR #4926: URL: https://github.com/apache/activemq-artemis/pull/4926 Issue Time Tracking --- Worklog Id: (was: 918218) Time Spent: 20m (was: 10m) > 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: 20m > 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)
[jira] [Work logged] (ARTEMIS-4765) Target Mirror is setting wrong size on duplicate cache
[ https://issues.apache.org/jira/browse/ARTEMIS-4765?focusedWorklogId=918205=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-918205 ] ASF GitHub Bot logged work on ARTEMIS-4765: --- Author: ASF GitHub Bot Created on: 07/May/24 22:57 Start Date: 07/May/24 22:57 Worklog Time Spent: 10m Work Description: clebertsuconic opened a new pull request, #4926: URL: https://github.com/apache/activemq-artemis/pull/4926 (no comment) Issue Time Tracking --- Worklog Id: (was: 918205) Remaining Estimate: 0h Time Spent: 10m > 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: 10m > 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)