-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Open
Labels
type/enhancementEverything related with code enhancement or performanceEverything related with code enhancement or performance
Description
Pre-check
- I am sure that all the content I provide is in English.
Search before asking
- I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo 3.3.7
JDK 17/21
Steps to reproduce this issue
Several tests across dubbo-config/dubbo-config-api exhibit flaky behavior when execution order or JVM internal iteration order changes. These flakes were consistently reproduced using:
./mvnw -q -pl dubbo-config/dubbo-config-api \
edu.illinois:nondex-maven-plugin:2.2.1:nondex \
-DnondexRuns=20What you expected to happen
The reason for the flakiness are below:
Micrometer metrics subsystem initialization
CompositeMeterRegistryuses mutable global structuresIdentityHashMapiteration order varies- Metrics are initialized implicitly during
DubboBootstrap.start()
DubboBootstrap global state not reset across tests
- ApplicationModel / FrameworkModel carry over state
- Reference cache survives between tests
- System properties affect bootstrap behavior if not cleared
Anything else
I have opened several PR's for solving the issue. I opened one PR per test file. The PRs below have been accepted:
- Fix: Stabilize
ExporterSideConfigUrlTestby disabling metrics initialization during URL export #15778 - Stabilize
MethodConfigTestby disabling metrics initialization to avoid Micrometer nondeterminism #15782 - Fix: Stabilize multiple tests in
ServiceConfigTestby isolating system properties and cached state #15785
The rest of the PR's mentioned below are open for review and follow the same method to solving the flakiness used in the PRs that were accepted above:
- Fix: Stabilize
ReferenceConfigTestby Disabling Metrics Initialization and Ensuring Test Isolation #15787 - Fix: Stabilize
ProtocolConfigTestby Disabling Metrics Initialization and Ensuring Test Isolation #15789 - Fix: Stabilize
ConsumerConfigTestby Disabling Metrics Initialization and Ensuring Test Isolation #15790 - Fix: Stabilize
ApplicationConfigTestby Disabling Metrics Initialization and Ensuring Test Isolation #15791 - Fix: Stabilize
ConfigCenterConfigTestby Disabling Metrics Initialization and Ensuring Test Isolation #15792 - Fix: Stabilize
DubboBootstrapTestby Disabling Metrics Initialization and Ensuring Test Isolation #15793 - Fix: Stabilize
ReferenceCacheTestby Disabling Metrics Initialization and Ensuring Test Isolation #15794
Are you willing to submit a pull request to fix on your own?
- Yes I am willing to submit a pull request on my own!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
type/enhancementEverything related with code enhancement or performanceEverything related with code enhancement or performance
Type
Projects
Status
Todo