Skip to content

autoconfiguration virtual-thread-pool#15220

Merged
oxsean merged 4 commits intoapache:3.3from
heliang666s:loom
Mar 14, 2025
Merged

autoconfiguration virtual-thread-pool#15220
oxsean merged 4 commits intoapache:3.3from
heliang666s:loom

Conversation

@heliang666s
Copy link
Member

What is the purpose of the change?

fix #15158

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 Mar 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.77%. Comparing base (3e5216f) to head (5530066).
Report is 162 commits behind head on 3.3.

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15220      +/-   ##
============================================
- Coverage     60.78%   60.77%   -0.01%     
- Complexity    10890    10893       +3     
============================================
  Files          1885     1885              
  Lines         86072    86077       +5     
  Branches      12892    12894       +2     
============================================
- Hits          52319    52317       -2     
- Misses        28306    28315       +9     
+ Partials       5447     5445       -2     
Flag Coverage Δ
integration-tests 33.10% <0.00%> (+0.02%) ⬆️
samples-tests 29.19% <60.00%> (-0.01%) ⬇️
unit-tests 58.90% <100.00%> (-0.02%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@RainYuY
Copy link
Member

RainYuY commented Mar 8, 2025

As far as I know, Virtual Threads is a new feature introduced after JDK 21, and Spring Boot added support for it starting from version 3.2. Should we add this configuration in dubbo-spring-boot-3?

@heliang666s
Copy link
Member Author

As far as I know, Virtual Threads is a new feature introduced after JDK 21, and Spring Boot added support for it starting from version 3.2. Should we add this configuration in dubbo-spring-boot-3?

but we don‘t have dubbo-spring-boot-3,only have dubbo-spring-boot-3-autoconfigure,but spring-boot-3-autoconfigure mainly handles aspects related to the Triple protocol, which is not closely related to configuration. Moreover, all configuration is processed in DubboDefaultPropertiesEnvironmentPostProcessor.java. Additionally, I believe that if the user is not using JDK 21 and Spring Boot 3, they wouldn't enable this configuration anyway.@Stellar1999


private void setDubboVirtualThreadsProperty(Environment environment, Map<String, Object> defaultProperties) {
String virtualEnabled = environment.getProperty(SPRING_THREAD_POOL_PROPERTY);
if (StringUtils.hasLength(virtualEnabled)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the value here

@oxsean
Copy link
Contributor

oxsean commented Mar 14, 2025

As far as I know, Virtual Threads is a new feature introduced after JDK 21, and Spring Boot added support for it starting from version 3.2. Should we add this configuration in dubbo-spring-boot-3?

but we don‘t have dubbo-spring-boot-3,only have dubbo-spring-boot-3-autoconfigure,but spring-boot-3-autoconfigure mainly handles aspects related to the Triple protocol, which is not closely related to configuration. Moreover, all configuration is processed in DubboDefaultPropertiesEnvironmentPostProcessor.java. Additionally, I believe that if the user is not using JDK 21 and Spring Boot 3, they wouldn't enable this configuration anyway.@Stellar1999

I think it's pretty simple at the moment, consider refactoring and pulling it out later when there's more configurations,

@oxsean oxsean merged commit a972d85 into apache:3.3 Mar 14, 2025
19 checks passed
@heliang666s heliang666s deleted the loom branch May 12, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants