-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Grpc max message size support config by user. #564
Conversation
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", |
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.
变量名建议加上 jraft 前缀,并且后面加上 bytes 单位 jraft.grpc.max_inbound_message_size.bytes
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.
done.
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.
似乎还是没加 jraft 前缀,并且存在重复代码,可以复用 rpc factory 的这个常量吧
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.
com.alipay.sofa.jraft.rpc.impl.GrpcRaftRpcFactory#RPC_SERVER_PROCESSOR_POOL_SIZE 这个字段的前缀没有jraft. 这里和RPC_SERVER_PROCESSOR_POOL_SIZE字段的前缀保持一致的。
可以用同一个key,让GrpcClient的复用GrpcRaftRpcFactory的。
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.
嗯,他原来没加也是不合适的,趁这次都加下 jraft 前缀,你可以一并改了,感谢
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.
OK了。
jraft-extension/rpc-grpc-impl/src/main/java/com/alipay/sofa/jraft/rpc/impl/GrpcClient.java
Outdated
Show resolved
Hide resolved
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
No description provided.