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

optimize: get netty config property from system properties. #3336

Merged
merged 4 commits into from
Dec 14, 2020
Merged

optimize: get netty config property from system properties. #3336

merged 4 commits into from
Dec 14, 2020

Conversation

jsbxyyx
Copy link
Member

@jsbxyyx jsbxyyx commented Dec 4, 2020

Ⅰ. Describe what this PR did

optimize: get netty config property from system properties.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

private int serverSelectorThreads = WORKER_THREAD_SIZE;
private int serverSocketSendBufSize = 153600;
private int serverSocketResvBufSize = 153600;
private int serverSelectorThreads = Integer.parseInt(System.getProperty(
Copy link
Contributor

Choose a reason for hiding this comment

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

这样的配置确实看起来很方便, 只是和目前的配置方式不统一了。

比如你可以参考父类 NettyBaseConfig.BOSS_THREAD_PREFIX 的属性赋值,每种方式都可以支持你目前的写法, 有限从系统属性中获取, 获取不到会从配置中心获取。

@CoffeeLatte007
Copy link
Contributor

需要讨论两个点:

  1. 这个是否应该做成一个可以配置的,太底层细节的东西是不是用比较固定的也还可以?
  2. 如果要做成可配置的话 是不是可以做成一个更友好的 通过文件或者配置中心 去做配置?

@funky-eyes funky-eyes added this to the 1.5.0 milestone Dec 6, 2020
@funky-eyes funky-eyes added the module/core core module label Dec 6, 2020
@jsbxyyx
Copy link
Member Author

jsbxyyx commented Dec 8, 2020

@CoffeeLatte007 @ls9527 我的想法是开启这个配置入口,但是又不想让用户通过配置文件的方式去更改。毕竟这些东西不怎么变动,但是有时候又需要修改。

@CoffeeLatte007
Copy link
Contributor

@CoffeeLatte007 @ls9527 我的想法是开启这个配置入口,但是又不想让用户通过配置文件的方式去更改。毕竟这些东西不怎么变动,但是有时候又需要修改。

这个理由赞同

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly slievrly merged commit f6193e3 into apache:develop Dec 14, 2020
private int serverSocketResvBufSize = 153600;
private int serverSelectorThreads = Integer.parseInt(System.getProperty(
ConfigurationKeys.TRANSPORT_PREFIX + "serverSelectorThreads", String.valueOf(WORKER_THREAD_SIZE)));
private int serverSocketSendBufSize = Integer.parseInt(System.getProperty(
Copy link

Choose a reason for hiding this comment

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

private int serverSocketSendBufSize = Integer.getInteger(TRANSPORT_PREFIX + "serverSocketSendBufSize", 153600);
改成这样是不是更直观点

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/core core module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants