bajiaoshan opened a new pull request, #16514: URL: https://github.com/apache/dubbo/pull/16514
## What is the purpose of the change? Refreshing a configuration in `OVERRIDE_IF_ABSENT` mode currently preserves top-level properties but overwrites already configured nested properties. For example, an explicitly disabled metrics aggregation becomes enabled when an external configuration sets `dubbo.metrics.aggregation.enabled=true`. Reuse an existing nested configuration instance during refresh and check each property's current value against its actual owning object. Instantiate a nested configuration only when it is missing. This preserves configured nested values while continuing to fill absent values and apply external overrides in the other tested modes. Add nine parameterized regression cases using real metrics configuration classes, including two nesting levels, an explicitly configured `false`, and previously absent nested objects. Before the fix, the two `OVERRIDE_IF_ABSENT` cases fail; after the fix, all nine pass. Fixes #16513. ## Validation - Before the fix, the nine new regression cases produce two assertion failures, both in `OVERRIDE_IF_ABSENT` mode. - After the fix, 128 selected configuration-related unit tests pass: 80 in `dubbo-common` (including the nine new cases) and 48 in `dubbo-config-api`. All 51 modules in the dependency reactor build successfully. - Checkstyle reports zero violations; Spotless and `git diff --check` pass. The Unix line-ending check is skipped on Windows. - The selected unit tests run with `-DenableEmbeddedZookeeper=false`; no external registry is required. Full-project and external-service integration tests have not been run locally. ## Checklist - [x] Link the corresponding GitHub issue. - [x] Explain the problem, root cause, and resulting behavior. - [x] Add regression tests and verify that they fail before the production fix and pass afterward. - [ ] Verify the upstream GitHub Actions results after submission. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
