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

support protobuf feature #1007

Merged
merged 35 commits into from
Jun 27, 2019
Merged

support protobuf feature #1007

merged 35 commits into from
Jun 27, 2019

Conversation

leizhiyuan
Copy link
Contributor

Ⅰ. Describe what this PR did

Ⅱ. 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

@codecov-io
Copy link

codecov-io commented May 9, 2019

Codecov Report

Merging #1007 into develop will decrease coverage by 9.69%.
The diff coverage is 28.91%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1007      +/-   ##
=============================================
- Coverage      45.36%   35.66%    -9.7%     
- Complexity      1511     2156     +645     
=============================================
  Files            256      408     +152     
  Lines          10354    21931   +11577     
  Branches        1339     3056    +1717     
=============================================
+ Hits            4697     7822    +3125     
- Misses          5073    13041    +7968     
- Partials         584     1068     +484
Impacted Files Coverage Δ Complexity Δ
.../protobuf/generated/GlobalStatusResponseProto.java 12.32% <ø> (ø) 8 <0> (?)
...dec/seata/protocol/AbstractResultMessageCodec.java 67.74% <ø> (ø) 5 <0> (?)
...ansaction/AbstractTransactionRequestToRMCodec.java 50% <ø> (ø) 1 <0> (?)
...a/codec/protobuf/generated/RegisterTMResponse.java 81.25% <ø> (ø) 2 <0> (?)
...dec/protobuf/generated/MergedWarpMessageProto.java 12.95% <ø> (ø) 9 <0> (?)
.../codec/protobuf/generated/GlobalCommitRequest.java 81.25% <ø> (ø) 2 <0> (?)
...ansaction/AbstractTransactionRequestToTCCodec.java 50% <ø> (ø) 1 <0> (?)
...src/main/java/io/seata/codec/seata/SeataCodec.java 80.64% <ø> (ø) 3 <0> (?)
...codec/protobuf/manager/ProtobufConvertManager.java 100% <ø> (ø) 5 <0> (?)
...ata/codec/protobuf/generated/MessageTypeProto.java 78.37% <ø> (ø) 27 <0> (?)
... and 336 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bc2187...9b7a715. Read the comment docs.

@leizhiyuan leizhiyuan changed the title support Feature protobuf support protobuf feature May 10, 2019
* reform code

* reform protobuf to same module

* add new data

* use upper case

* fix bug,write new pb objetc type

* write fullname to data

* fix bug
add test case
@leizhiyuan leizhiyuan requested review from zhangthen and slievrly and removed request for zhangthen May 10, 2019 07:29
@leizhiyuan leizhiyuan requested a review from ujjboy May 13, 2019 12:05
@zhangthen zhangthen added this to the 0.7.0 milestone May 16, 2019
# Conflicts:
#	all/pom.xml
#	bom/pom.xml
#	core/pom.xml
#	core/src/main/java/io/seata/core/constants/ConfigurationKeys.java
#	core/src/main/java/io/seata/core/protocol/AbstractIdentifyResponse.java
#	core/src/main/java/io/seata/core/protocol/AbstractMessage.java
#	core/src/main/java/io/seata/core/protocol/MergedWarpMessage.java
#	core/src/main/java/io/seata/core/protocol/transaction/AbstractBranchEndRequest.java
#	core/src/main/java/io/seata/core/rpc/netty/MessageCodecHandler.java
@slievrly
Copy link
Member

I will verify the function.

Copy link
Contributor

@zhangthen zhangthen left a comment

Choose a reason for hiding this comment

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

I run the branch in local machine , the result is normal.

private static final int MAGIC_HALF = -38;
private static final int NOT_FOUND_INDEX = -1;

private static Configuration configuration = ConfigurationFactory.getInstance();

private static String serialize = configuration.getConfig(ConfigurationKeys.SERIALIZE_FOR_RPC);
Copy link
Member

Choose a reason for hiding this comment

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

should there be a default value that is compatible with the previous configuration file?

/**
* The constant UTF8.
*/
protected static final Charset UTF8 = Charset.forName("utf-8");
Copy link
Member

Choose a reason for hiding this comment

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

unused
utf8 -> StandardCharsets.UTF_8

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

image

codec=seata

@leizhiyuan
Copy link
Contributor Author

image

It seems ok for me in protobuf

@slievrly
Copy link
Member

image

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

image
GlobalBeginRequest

@leizhiyuan
Copy link
Contributor Author

image
GlobalBeginRequest

I will check it

@slievrly
Copy link
Member

@leizhiyuan It's my fault. I loaded SW when I started it, causing the class to be delegated.
image

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

Functional verification has passed.

@slievrly slievrly merged commit f49bb8d into develop Jun 27, 2019
@ujjboy ujjboy deleted the feature_probuf branch June 27, 2019 11:48
nick-tan pushed a commit to nick-tan/seata that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants