-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Conversation
private int serverSelectorThreads = WORKER_THREAD_SIZE; | ||
private int serverSocketSendBufSize = 153600; | ||
private int serverSocketResvBufSize = 153600; | ||
private int serverSelectorThreads = Integer.parseInt(System.getProperty( |
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.
这样的配置确实看起来很方便, 只是和目前的配置方式不统一了。
比如你可以参考父类 NettyBaseConfig.BOSS_THREAD_PREFIX 的属性赋值,每种方式都可以支持你目前的写法, 有限从系统属性中获取, 获取不到会从配置中心获取。
需要讨论两个点:
|
@CoffeeLatte007 @ls9527 我的想法是开启这个配置入口,但是又不想让用户通过配置文件的方式去更改。毕竟这些东西不怎么变动,但是有时候又需要修改。 |
这个理由赞同 |
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
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( |
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.
private int serverSocketSendBufSize = Integer.getInteger(TRANSPORT_PREFIX + "serverSocketSendBufSize", 153600);
改成这样是不是更直观点
Ⅰ. 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