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

Grpc max message size support config by user. #564

Merged
merged 6 commits into from
Apr 4, 2021

Conversation

horizonzy
Copy link
Member

No description provided.

private final Map<Endpoint, ManagedChannel> managedChannelPool = new ConcurrentHashMap<>();
private final Map<Endpoint, AtomicInteger> transientFailures = new ConcurrentHashMap<>();
private static final int RPC_MAX_INBOUND_MESSAGE_SIZE = SystemPropertyUtil.getInt(
"grpc.max_inbound_message_size",
Copy link
Contributor

Choose a reason for hiding this comment

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

变量名建议加上 jraft 前缀,并且后面加上 bytes 单位 jraft.grpc.max_inbound_message_size.bytes

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor

Choose a reason for hiding this comment

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

似乎还是没加 jraft 前缀,并且存在重复代码,可以复用 rpc factory 的这个常量吧

Copy link
Member Author

Choose a reason for hiding this comment

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

com.alipay.sofa.jraft.rpc.impl.GrpcRaftRpcFactory#RPC_SERVER_PROCESSOR_POOL_SIZE 这个字段的前缀没有jraft. 这里和RPC_SERVER_PROCESSOR_POOL_SIZE字段的前缀保持一致的。

可以用同一个key,让GrpcClient的复用GrpcRaftRpcFactory的。

Copy link
Contributor

Choose a reason for hiding this comment

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

嗯,他原来没加也是不合适的,趁这次都加下 jraft 前缀,你可以一并改了,感谢

Copy link
Member Author

Choose a reason for hiding this comment

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

OK了。

@sofastack-bot sofastack-bot bot added size/XS and removed size/S labels Apr 1, 2021
@sofastack-bot sofastack-bot bot added size/S and removed size/XS labels Apr 2, 2021
Copy link
Contributor

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

@killme2008 killme2008 merged commit 1b9f6d2 into sofastack:master Apr 4, 2021
@fengjiachun fengjiachun mentioned this pull request Apr 7, 2021
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants