gnodet opened a new pull request, #23769:
URL: https://github.com/apache/camel/pull/23769

   [CAMEL-23686](https://issues.apache.org/jira/browse/CAMEL-23686)
   
   ## Summary
   
   - Fix dev profile unconditionally overriding user-configured properties like 
`camel.main.messageHistory=false`
   - `ProfileConfigurer` now checks `autoConfiguredProperties` to skip settings 
the user explicitly set
   - `DefaultConfigurationConfigurer` applies `messageHistory` and 
`sourceLocationEnabled` unconditionally (not only when true)
   
   ## Problem
   
   The dev profile in `ProfileConfigurer.configureCommon()` unconditionally set 
`messageHistory=true` and other settings, running AFTER user properties were 
loaded. This meant `camel.main.messageHistory=false` in 
`application.properties` had no effect.
   
   With pooled exchanges, this caused `DefaultMessageHistory` instances to 
accumulate unbounded — 2.95M instances consuming 236MB in a 60s test, 
ballooning heap from 75MB (prod profile) to 696MB (dev profile).
   
   ## Changes
   
   - **`ProfileConfigurer.java`**: `setIfNotConfigured()` helper checks 
`autoConfiguredProperties` before applying dev profile defaults
   - **`BaseMainSupport.java`**: Pass `autoConfiguredProperties` to 
`ProfileConfigurer.configureMain()`
   - **`DefaultConfigurationConfigurer.java`**: Change asymmetric if-guards 
(`if (config.isX()) { set(true); }`) to unconditional application 
(`set(config.isX())`)
   
   ## Test plan
   
   - [x] `MainTest` (11 tests) — pass
   - [x] `MainSecurityPolicyTest` (35 tests) — pass, including dev profile 
security policy tests
   - [x] All camel-main tests (230 tests) — pass


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