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

feature: add http support #1746

Merged
merged 57 commits into from
Jan 19, 2020
Merged

feature: add http support #1746

merged 57 commits into from
Jan 19, 2020

Conversation

wxbty
Copy link
Member

@wxbty wxbty commented Oct 11, 2019

Ⅰ. Describe what this PR did

this PR provide support for HTTP calls in global transaction

Ⅱ. Does this pull request fix one issue?

no

Ⅲ. Why don't you add test cases (unit test/integration test)?

1、refer to dubbo way,no test cases
2、need start a http server,It's a bit troublesome ,will be add later

Ⅳ. Describe how to verify it

in AT mode, use customize httpExcutor impl, verify like as dubbo call

Ⅴ. Special notes for reviews

1、do not need to config in springboot env
2、import HttpAutoConfiguration bean for common spring env
3、provider abstract way to expand http call process ,as headers, body,entity and result convert for sign or other features;
4、For the time being, only get and post is supported

1、do not need to config in springboot env
2、import HttpAutoConfiguration bean for common spring env
@codecov-io
Copy link

codecov-io commented Oct 11, 2019

Codecov Report

Merging #1746 into develop will increase coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1746      +/-   ##
=============================================
+ Coverage       54.2%   54.21%   +<.01%     
- Complexity      2487     2489       +2     
=============================================
  Files            453      453              
  Lines          14888    14888              
  Branches        1755     1755              
=============================================
+ Hits            8070     8071       +1     
  Misses          6045     6045              
+ Partials         773      772       -1
Impacted Files Coverage Δ Complexity Δ
...o/seata/saga/statelang/domain/DomainConstants.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...src/main/java/io/seata/server/ParameterParser.java 44.68% <0%> (-2.13%) 11 <1> (ø)
...ain/java/io/seata/config/ConfigurationFactory.java 51.02% <100%> (ø) 3 <0> (ø) ⬇️
...o/seata/server/coordinator/DefaultCoordinator.java 47.65% <0%> (+0.39%) 28% <0%> (+1%) ⬆️
...in/java/io/seata/server/session/GlobalSession.java 84.61% <0%> (+0.48%) 68% <0%> (+1%) ⬆️

@slievrly
Copy link
Member

@wxbty how to use ? DefaultHttpExecutor.get/post ? can you add some test case?

@slievrly slievrly changed the title add http support feature: add http support Oct 11, 2019
@wxbty
Copy link
Member Author

wxbty commented Oct 11, 2019 via email

@xingfudeshi
Copy link
Member

@wxbty Can you add the test case to this PR?

@wxbty
Copy link
Member Author

wxbty commented Oct 11, 2019

@wxbty Can you add the test case to this PR?

Already added

@xingfudeshi xingfudeshi self-requested a review October 12, 2019 03:22
@xingfudeshi xingfudeshi added the type: feature Category issues or prs related to feature request. label Oct 12, 2019
@xingfudeshi
Copy link
Member

@wxbty please associate mail with your Github account.

git config --global user.name "XXXX"
git config --global user.email "XXX@XXX.com"

After that,re-push your commits.

wangxb added 2 commits October 12, 2019 11:30
Found a bug in the case of multiple requests,
The reason for troubleshooting is that after the execution of the http interface method, the xid in the thread is not released. Since the tomcat uses the thread pool to handle the connection, the xid is reused, and the xid does not exist on the server.
Repair method: release the xid after the interface method is finished, like dubbo
@wxbty
Copy link
Member Author

wxbty commented Oct 12, 2019

@wxbty please associate mail with your Github account.

git config --global user.name "XXXX"
git config --global user.email "XXX@XXX.com"

After that,re-push your commits.

I only need to change the last commit, or close the PR to republish?

@xingfudeshi
Copy link
Member

The last commit.

@wxbty
Copy link
Member Author

wxbty commented Oct 12, 2019

The last commit.

Already changed

@zjinlei zjinlei added the first-time contributor first-time contributor label Oct 12, 2019
@slievrly slievrly added this to the 1.0 milestone Oct 14, 2019
spring/pom.xml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
spring/pom.xml Outdated Show resolved Hide resolved
@zjinlei zjinlei added this to the 1.1.0 milestone Jan 2, 2020
@wxbty wxbty requested a review from slievrly January 6, 2020 01:26
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.

LGTM

Copy link
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly slievrly merged commit 7c00335 into apache:develop Jan 19, 2020
booogu pushed a commit to booogu/seata that referenced this pull request Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time contributor first-time contributor type: feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants