You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@seata.apache.org by "Bughue (via GitHub)" <gi...@apache.org> on 2023/12/25 11:01:51 UTC
[PR] optimize : Unwinding RpcMessage and Encoder/Decoder dependencies [incubator-seata]
Bughue opened a new pull request, #6209:
URL: https://github.com/apache/incubator-seata/pull/6209
<!-- Please make sure you have read and understood the contributing guidelines -->
- [ ] I have registered the PR [changes](../changes).
### Ⅰ. Describe what this PR did
新引入ProtocolRpcMessage(接口),用以解开rpcmessage和encoder/decoder的依赖关系。encoder/decoder只依赖ProtocolRpcMessage(支持不同版本协议的区分),而原有的RpcMessage继续服务于协议解析后的业务逻辑
A new ProtocolRpcMessage interface is introduced to decouple rpcmessage from encoder/decoder, which only relies on ProtocolRpcMessage (to support differentiation between different versions of the protocol), while the original RpcMessage continues to serve the The original RpcMessage continues to serve the business logic after the protocol is parsed.
### Ⅱ. Does this pull request fix one issue?
<!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
I'll add it later.
### Ⅲ. Why don't you add test cases (unit test/integration test)?
### Ⅳ. Describe how to verify it
### Ⅴ. Special notes for reviews
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org
Re: [PR] optimize : Eliminate RpcMessage and Encoder/Decoder dependencies [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes merged PR #6209:
URL: https://github.com/apache/incubator-seata/pull/6209
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize : Eliminate RpcMessage and Encoder/Decoder dependencies [incubator-seata]
Posted by "Bughue (via GitHub)" <gi...@apache.org>.
Bughue closed pull request #6209: optimize : Eliminate RpcMessage and Encoder/Decoder dependencies
URL: https://github.com/apache/incubator-seata/pull/6209
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize : Eliminate RpcMessage and Encoder/Decoder dependencies [incubator-seata]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6209:
URL: https://github.com/apache/incubator-seata/pull/6209#issuecomment-1876472841
## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: `128 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`d2dbbff`)](https://app.codecov.io/gh/apache/incubator-seata/commit/d2dbbff8b88e2a9d2cbe2ad3dda461e8c6646000?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 48.98% compared to head [(`95573d3`)](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 49.53%.
> Report is 2 commits behind head on 2.x.
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## 2.x #6209 +/- ##
============================================
+ Coverage 48.98% 49.53% +0.55%
- Complexity 4779 4880 +101
============================================
Files 915 918 +3
Lines 31896 32000 +104
Branches 3855 3858 +3
============================================
+ Hits 15624 15852 +228
+ Misses 14710 14591 -119
+ Partials 1562 1557 -5
```
| [Files](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [.../io/seata/core/rpc/netty/v1/ProtocolV1Decoder.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcnBjL25ldHR5L3YxL1Byb3RvY29sVjFEZWNvZGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...c/main/java/io/seata/core/protocol/RpcMessage.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcHJvdG9jb2wvUnBjTWVzc2FnZS5qYXZh) | `77.77% <33.33%> (-5.56%)` | :arrow_down: |
| [.../io/seata/core/rpc/netty/v1/ProtocolV1Encoder.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcnBjL25ldHR5L3YxL1Byb3RvY29sVjFFbmNvZGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ta/core/rpc/netty/AbstractNettyRemotingClient.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcnBjL25ldHR5L0Fic3RyYWN0TmV0dHlSZW1vdGluZ0NsaWVudC5qYXZh) | `18.53% <0.00%> (-0.19%)` | :arrow_down: |
| [...va/io/seata/core/rpc/netty/ProtocolRpcMessage.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcnBjL25ldHR5L1Byb3RvY29sUnBjTWVzc2FnZS5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...io/seata/core/rpc/netty/AbstractNettyRemoting.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcnBjL25ldHR5L0Fic3RyYWN0TmV0dHlSZW1vdGluZy5qYXZh) | `13.92% <0.00%> (-0.37%)` | :arrow_down: |
| [...ta/core/rpc/netty/AbstractNettyRemotingServer.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcnBjL25ldHR5L0Fic3RyYWN0TmV0dHlSZW1vdGluZ1NlcnZlci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../seata/core/rpc/netty/v1/ProtocolRpcMessageV1.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcnBjL25ldHR5L3YxL1Byb3RvY29sUnBjTWVzc2FnZVYxLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6209?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2lvL3NlYXRhL2NvcmUvcnBjL25ldHR5L3YwL1Byb3RvY29sUnBjTWVzc2FnZVYwLmphdmE=) | `0.00% <0.00%> (ø)` | |
... and [24 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/6209/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org
Re: [PR] optimize : Eliminate RpcMessage and Encoder/Decoder dependencies [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on code in PR #6209:
URL: https://github.com/apache/incubator-seata/pull/6209#discussion_r1436780792
##########
core/src/main/java/io/seata/core/protocol/RpcMessage.java:
##########
@@ -169,6 +171,14 @@ public void setMessageType(byte messageType) {
this.messageType = messageType;
}
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
Review Comment:
client也会使用到rpcmessage,为什么不让新版的客户端直接传递当前的协议版本号?
The client will also use rpcmessage, why not let the new version of the client side directly pass the current protocol version number?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org