-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[develop] add request type field at the head of task data, exchange parse order between Log and GetRequest #7871
Conversation
a91255c
to
80d69d3
Compare
80d69d3
to
755d569
Compare
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.
这会导致升级不兼容。
我同意两次try catch非常不优雅,但是目前这样运行起来无问题, 关于issue中提出的关于先Write的异议,目前没有WriteRequest只设置了2个字段,我查看至少都有设置3个以上,比如data,operation和group。 因此在找到合理的替代方式之前建议保持原样。 |
return result; | ||
if (bytes[0] == REQUEST_TYPE_FIELD_TAG) { | ||
if (bytes[1] == REQUEST_TYPE_READ) { | ||
result = ReadRequest.parseFrom(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.
bytes中添加了2个标示位, parse之前应该移除掉这两个标示位,才能正确解析吧?
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.
不用删除,只是解析的结果多了个unknown fields,field的名称为编号7,grpc服务端和客户端可以通过unknown fields配置自己特有的字段,目的就是为了相互兼容老版本
兼容的,利用的是unknown fields机制 |
有搭建集群进行一下测试吗? |
1.x一直在用集群压测试,2.0只测了单元功能。 |
What is the purpose of the change
see #7757