Fix thread pool configuration is invalid #11528
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Fix #11524
issue:
Initiating RPC in the life cycle initialization phase of Spring Bean, that is, before ServiceBean#afterPropertiesSet, because configManager does not have any serviceConfig, and without publishing any provider, the DefaultApplicationDeployer#exportMetadataService() method is first triggered, resulting in org.apache.dubbo.metadata The .MetadataService metadata interface is exported first, and finally the url is passed and fixed in the ChannelHandler. After the service starts to receive the request, when obtaining the ExecutorService, the thread pool of the MetadataService is obtained through the url, not the thread pool configured by parameters such as dubbo.protocol.threads.
solve:
When the getExecutor(URL url) method obtains the thread pool, if it is the provider side and has a user-defined interface, the service thread pool will be used first to avoid using its own thread when the registered URL is org.apache.dubbo.metadata.MetadataService pool.
Brief changelog
Verifying this change
Checklist