-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
Provider supports thread pool isolation between services #10658
Provider supports thread pool isolation between services #10658
Conversation
Codecov Report
@@ Coverage Diff @@
## 3.2 #10658 +/- ##
============================================
+ Coverage 65.30% 65.43% +0.13%
+ Complexity 416 392 -24
============================================
Files 1338 1347 +9
Lines 57058 57189 +131
Branches 8452 8464 +12
============================================
+ Hits 37262 37422 +160
+ Misses 15829 15806 -23
+ Partials 3967 3961 -6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…emoved) 2.Consumers should not involved in service thread pool isolation
e141895
to
f15d954
Compare
# Conflicts: # dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java # dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/manager/DefaultExecutorRepository.java # dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/builders/AbstractServiceBuilder.java # dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
# Conflicts: # dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleHttp2Protocol.java # dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/TripleHttp2FrameServerHandler.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
|
||
@Override | ||
protected ServiceKey getServiceKey(Object data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The servicekey seems to have been obtained in onheader, can it be reused? But there is a problem here, onheader is already in the business thread pool, you may need to pay attention
@@ -109,6 +107,8 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc | |||
} | |||
|
|||
public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame msg) throws Exception { | |||
Executor executor = executorSupport.getExecutor(msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the calculation of the thread pool can be put into the onheader method, and the previous part of the logic can be executed in the eventloop. (Only basic judgment, no complex logic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For details, see apache/dubbo-awesome#92 (comment)