[ 
https://issues.apache.org/jira/browse/ARTEMIS-5871?focusedWorklogId=1003425&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1003425
 ]

ASF GitHub Bot logged work on ARTEMIS-5871:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Feb/26 10:17
            Start Date: 04/Feb/26 10:17
    Worklog Time Spent: 10m 
      Work Description: gtully commented on code in PR #6205:
URL: https://github.com/apache/artemis/pull/6205#discussion_r2763244897


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java:
##########
@@ -4682,22 +4682,28 @@ public void reloadConfigurationFile() throws Exception {
    }
 
    private void reloadConfigurationFile(URL xmlConfigUri) throws Exception {
+      Configuration config = new ConfigurationImpl();
       if (xmlConfigUri != null) {
-         Configuration config = new 
FileConfigurationParser().parseMainConfig(xmlConfigUri.openStream());
+         config = new 
FileConfigurationParser().parseMainConfig(xmlConfigUri.openStream());
          LegacyJMSConfiguration legacyJMSConfiguration = new 
LegacyJMSConfiguration(config);
          legacyJMSConfiguration.parseConfiguration(xmlConfigUri.openStream());
-         configuration.setSecurityRoles(config.getSecurityRoles());
-         configuration.setAddressSettings(config.getAddressSettings());
-         
configuration.setDivertConfigurations(config.getDivertConfigurations());
-         
configuration.setAddressConfigurations(config.getAddressConfigurations());
-         configuration.setQueueConfigs(config.getQueueConfigs());
-         
configuration.setBridgeConfigurations(config.getBridgeConfigurations());
-         
configuration.setConnectorConfigurations(config.getConnectorConfigurations());
-         
configuration.setAcceptorConfigurations(config.getAcceptorConfigurations());
-         
configuration.setAMQPConnectionConfigurations(config.getAMQPConnection());
-         configuration.setPurgePageFolders(config.isPurgePageFolders());
       }
-      configuration.parseProperties(propertiesFileUrl);
+      config.parseProperties(propertiesFileUrl);
+      configuration.setStatus(config.getStatus());
+

Review Comment:
   that is exactly the intent, the new config is just for the purpose of being 
reloaded by the reload logic. There is currently no callback for programatic 
config. Typically broker config is read once at startup. The reload logic is 
restricted to the set of accessors that support reload, the bits that are 
copied over after a config is reread.  Then the 
deployReloadableConfigFromConfiguration method does the heavy lifting of 
applying any changes or not to individual components.
   
   So the difference check is all in deployReloadableConfigFromConfiguration





Issue Time Tracking
-------------------

    Worklog Id:     (was: 1003425)
    Time Spent: 1.5h  (was: 1h 20m)

> reload of broker properties config should be restricted to confined to 
> re-loadable components
> ---------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-5871
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5871
>             Project: Artemis
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.50.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> currently on reload config, broker properties are applied to the current 
> broker config in error. 
> This means that the absence of a value is not reflected in the config update, 
> simply removing the properties does not result in a removed component or 
> configuration entry.
> This is not consistent with the xml reload but also means for properties only 
> config, there needs to be an explicit remove key=- value. which then needs to 
> be removed. 
> If config reload of properties are confined to a new config that is then 
> compared in the normal way with the component reload logic, the properties 
> can be the source of truth.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to