You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "CrazyHZM (GitHub)" <gi...@apache.org> on 2018/12/15 13:42:02 UTC

[GitHub] [incubator-dubbo] CrazyHZM opened issue #2970: what's design intent of 'SHARED_EXECUTOR' Attribute in WrappedChannelHandler.java

- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: xxx
* Operating System version: xxx
* Java version: xxx

### Steps to reproduce this issue

1. xxx
2. xxx
3. xxx

Pls. provide [GitHub address] to reproduce this issue.

### Expected Result

What do you expected from the above steps?

### Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

```
Just put your stack trace here!
```


[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2970 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh commented on issue #2970: what's design intent of 'SHARED_EXECUTOR' Attribute in WrappedChannelHandler.java

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
the SHARED_EXECUTOR is a static field.

You can find out where this method is being used:
WrappedChannelHandler#getExecutorService

You can find out where this method is being used. If the user-configured executor does not exist, we will use this executor to handle the event. Maybe this is the meaning of sharing.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2970 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2970: what's design intent of 'SHARED_EXECUTOR' Attribute in WrappedChannelHandler.java

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
the SHARED_EXECUTOR is a static field.

You can find out where this method is being used:
WrappedChannelHandler#getExecutorService

If the user-configured executor does not exist, we will use this executor to handle the event. Maybe this is the meaning of sharing.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2970 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2970: what's design intent of 'SHARED_EXECUTOR' Attribute in WrappedChannelHandler.java

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Sometimes we can design a new dispatcher and server.
In this cases, maybe we should use the shared executor.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2970 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] CrazyHZM commented on issue #2970: what's design intent of 'SHARED_EXECUTOR' Attribute in WrappedChannelHandler.java

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
I agree with this point of view, but I think we  should create a thread pool while the user-configured executor does not exist, instead of treating it as a static variable.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2970 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2970: what's design intent of 'SHARED_EXECUTOR' Attribute in WrappedChannelHandler.java

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Personally think that a static final value can meet our needs.
What is the benefit of creating a new pool each time?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2970 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] CrazyHZM commented on issue #2970: what's design intent of 'SHARED_EXECUTOR' Attribute in WrappedChannelHandler.java

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
Each url corresponds to a WrappedChannelHandler instance, that is to say, each WrappedChannelHandler has a static constant SHARED_EXECUTOR.
I think this does not play a role, also if the user does not configure I create a thread pool in the constructor , at least it can be ruled out that the user has configured to use this static constant.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2970 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh closed issue #2970: what's design intent of 'SHARED_EXECUTOR' Attribute in WrappedChannelHandler.java

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
[ issue closed by carryxyh ]

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2970 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org