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

Propagate RequestAttributes across Hystrix Thread boundary #2509

Closed
wants to merge 1 commit into from
Closed

Conversation

eacdy
Copy link
Contributor

@eacdy eacdy commented Dec 4, 2017

Sometimes we need to get request attribute in feign's interceptor or other where else. So it's necessary to copy the attributes managed by the Spring RequestContextHolder from the main thread to the threads managed by Hystrix thread pool.
Inspired by #1379

@codecov-io
Copy link

codecov-io commented Dec 4, 2017

Codecov Report

Merging #2509 into master will decrease coverage by 0.41%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2509      +/-   ##
==========================================
- Coverage   65.65%   65.23%   -0.42%     
==========================================
  Files         207      210       +3     
  Lines        7646     7695      +49     
  Branches      943      944       +1     
==========================================
  Hits         5020     5020              
- Misses       2268     2317      +49     
  Partials      358      358
Impacted Files Coverage Δ
...uest/HystrixRequestAttributeAutoConfiguration.java 0% <0%> (ø)
...st/RequestAttributeHystrixConcurrencyStrategy.java 0% <0%> (ø)
...rix/request/HystrixRequestAttributeProperties.java 0% <0%> (ø)

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 05cd507...2f2b203. Read the comment docs.

@ryanjbaxter
Copy link
Contributor

You will need to provide some tests

@xiaods
Copy link

xiaods commented Dec 5, 2017

need testing

@EchoAGI
Copy link

EchoAGI commented Mar 17, 2018

need to simplify it

@manavdewan1990
Copy link

+1

@spencergibb
Copy link
Member

@eacdy can you rebase and add a test?

@spencergibb spencergibb added icebox and removed backlog labels Sep 5, 2018
@eacdy
Copy link
Contributor Author

eacdy commented Sep 6, 2018

@spencergibb Sorry, I don't have enough time. Could you help me rebase and add a test?

@zedongQ
Copy link

zedongQ commented Jan 3, 2019

同时存在多个请求的时候,request 之间数据互串了?怎么解决呢?

@hongtu1993
Copy link

同时存在多个请求的时候,request 之间数据互串了?怎么解决呢?

这份问题是测试出来的新bug吗?

@eacdy
Copy link
Contributor Author

eacdy commented Apr 1, 2019

@hongtu1993 不是。

@OlgaMaciaszek
Copy link
Collaborator

@zedongQ @hongtu1993 @eacdy @gaoyibing111 . Please only use English to comment on PRs in this repository. If you want us to take them into consideration, please translate your latest comments to English. The Spring Cloud Team does not speak the language you've used here.

@gaoyibing111
Copy link

@zedongQ @hongtu1993 @eacdy @gaoyibing111 . Please only use English to comment on PRs in this repository. If you want us to take them into consideration, please translate your latest comments to English. The Spring Cloud Team does not speak the language you've used here.

ok ,tks

@ottes
Copy link

ottes commented Apr 1, 2020

Well any new progress here? Workaround or will this be implemented some time?

@spencergibb
Copy link
Member

I don't think so.

@HuangDayu
Copy link

@eacdy Hello , I read your blog and plan to use this solution in a production environment. Have you encountered any problems during use?

@marcingrzejszczak marcingrzejszczak deleted the branch spring-cloud:master April 26, 2021 14:57
@wangzhengxi
Copy link

so,how to deal it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet