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



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to