Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.3] Optimized Wrapper#getWrapper and some unit tests #15164

Merged
merged 8 commits into from
Mar 3, 2025

Conversation

zrlw
Copy link
Contributor

@zrlw zrlw commented Feb 22, 2025

What is the purpose of the change?

try to fix #15160

  1. cached wrapper as soon as possible.
  2. fixed exhausted thread pool issue: destroyed all framework model before running some unit tests. dubbo thread pool might be exhausted by some other unit tests which don't destroyed framework models after their running.
  3. fixed address already in use issue: un-exported service config of some unit tests.

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.76%. Comparing base (cedc583) to head (2d6419a).
Report is 9 commits behind head on 3.3.

Files with missing lines Patch % Lines
...java/org/apache/dubbo/common/bytecode/Wrapper.java 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15164      +/-   ##
============================================
+ Coverage     60.71%   60.76%   +0.05%     
- Complexity    10877    10900      +23     
============================================
  Files          1884     1885       +1     
  Lines         86055    86064       +9     
  Branches      12894    12894              
============================================
+ Hits          52247    52299      +52     
+ Misses        28353    28322      -31     
+ Partials       5455     5443      -12     
Flag Coverage Δ
integration-tests 33.18% <33.33%> (+0.09%) ⬆️
samples-tests 29.20% <33.33%> (+<0.01%) ⬆️
unit-tests 58.89% <66.66%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zrlw zrlw changed the title [3.3] Optimized getWrapper of bytecode Wrapper [3.3] Optimized getWrapper of bytecode Wrapper and DemoServiceImpl of dubbo-remoting-netty4 Feb 23, 2025
@zrlw zrlw force-pushed the 3.3-Optimized-byteCodeWrapper branch from df82aea to 217cd51 Compare February 23, 2025 11:56
@zrlw
Copy link
Contributor Author

zrlw commented Feb 23, 2025

@AlbumenJ
PTAL
i don't know this pr whether fixed the issue or not asBuild and Test Scheduled On 3.3 could not be triggered on pull request.

@AlbumenJ
Copy link
Member

zrlw

You can trigger it on your own Github Repo Actions

@zrlw
Copy link
Contributor Author

zrlw commented Feb 24, 2025

zrlw

You can trigger it on your own Github Repo Actions
i can trigger it but actions/checkout@v4 and other actions are not allowed to be used in my repository.
image

@zrlw
Copy link
Contributor Author

zrlw commented Feb 24, 2025

zrlw

You can trigger it on your own Github Repo Actions
i can trigger it but actions/checkout@v4 and other actions are not allowed to be used in my repository.
image

i got it
image

@zrlw zrlw force-pushed the 3.3-Optimized-byteCodeWrapper branch 7 times, most recently from 0fdec04 to f03ba4b Compare February 25, 2025 09:19
@zrlw
Copy link
Contributor Author

zrlw commented Feb 25, 2025

i tested it on my own Github Repo Actions,

  1. it seemed that only adding back dubbo-test-check fixed [Bug] Build and Test Scheduled On 3.3 might be always failed since 'feat: remove useless dependency(#15125)' #15160.
    i doubt some dubbo-remoting-netty4 unit tests that runned before ReplierDispatcherTest don't destroy FrameworkModel, the issue was covered up because DubboTestChecker#executionFinished called FrameworkModel.destroyAll at the end of each test execution?

  2. i found a new issue related with EagerThreadPoolExecutorTest.testEagerThreadPoolFast, and it doesn't happen every time.

Error:  org.apache.dubbo.common.threadpool.support.eager.EagerThreadPoolExecutorTest.testEagerThreadPoolFast -- Time elapsed: 10.08 s <<< ERROR!
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in org.apache.dubbo.common.threadpool.support.eager.EagerThreadPoolExecutorTest was not fulfilled within 10 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:975)
	at org.apache.dubbo.common.threadpool.support.eager.EagerThreadPoolExecutorTest.testEagerThreadPoolFast(EagerThreadPoolExecutorTest.java:137)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

see details https://github.com/zrlw/dubbo/actions/runs/13517737168/job/37770517010

@zrlw zrlw changed the title [3.3] Optimized getWrapper of bytecode Wrapper and DemoServiceImpl of dubbo-remoting-netty4 [3.3] Optimized getWrapper of bytecode Wrapper and added dubbo-test-check back to dubbo-remoting-netty4 Feb 25, 2025
@zrlw zrlw force-pushed the 3.3-Optimized-byteCodeWrapper branch from f03ba4b to 1049724 Compare February 25, 2025 12:30
@zrlw zrlw changed the title [3.3] Optimized getWrapper of bytecode Wrapper and added dubbo-test-check back to dubbo-remoting-netty4 [3.3] Optimized getWrapper of bytecode Wrapper and destroyed all framework model before each test of dubbo-remoting-netty4#ReplierDispatcherTest Feb 25, 2025
@zrlw zrlw changed the title [3.3] Optimized getWrapper of bytecode Wrapper and destroyed all framework model before each test of dubbo-remoting-netty4#ReplierDispatcherTest [3.3] Optimized Wrapper#getWrapper, destroyed all framework model before each test of ReplierDispatcherTest, cleared application config manager before running some dubbo config unit tests Feb 26, 2025
@zrlw zrlw changed the title [3.3] Optimized Wrapper#getWrapper, destroyed all framework model before each test of ReplierDispatcherTest, cleared application config manager before running some dubbo config unit tests [3.3] Optimized Wrapper#getWrapper, destroyed all framework model before some unit tests, cleared application config manager before running some dubbo config unit tests Feb 26, 2025
@zrlw zrlw changed the title [3.3] Optimized Wrapper#getWrapper, destroyed all framework model before some unit tests, cleared application config manager before running some dubbo config unit tests [3.3] Optimized Wrapper#getWrapper, destroyed all framework model before running some unit tests, cleared application config manager before running some dubbo config unit tests Feb 26, 2025
@zrlw zrlw force-pushed the 3.3-Optimized-byteCodeWrapper branch from 5ddba75 to 11ac274 Compare February 26, 2025 07:27
@zrlw zrlw changed the title [3.3] Optimized Wrapper#getWrapper, destroyed all framework model before running some unit tests, cleared application config manager before running some dubbo config unit tests [3.3] Optimized Wrapper#getWrapper, cleared application config manager before running some dubbo config unit tests Feb 26, 2025
@zrlw zrlw changed the title [3.3] Optimized Wrapper#getWrapper, cleared application config manager before running some dubbo config unit tests [3.3] Optimized Wrapper#getWrapper and some unit tests Feb 26, 2025
@zrlw zrlw force-pushed the 3.3-Optimized-byteCodeWrapper branch from 5a14d71 to 18c7776 Compare February 26, 2025 09:38
@zrlw zrlw force-pushed the 3.3-Optimized-byteCodeWrapper branch from 55cdf5d to cea9b45 Compare February 26, 2025 22:51
@AlbumenJ AlbumenJ merged commit dfc6f3c into apache:3.3 Mar 3, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Build and Test Scheduled On 3.3 might be always failed since 'feat: remove useless dependency(#15125)'
3 participants