Comments (3)
Another side effect of this is that the fallback function is called twice.
from hystrix-go.
where are you seeing the error channel being closed? channels should not be closed by receiving code, only by senders: http://golang.org/pkg/builtin/#close
you are right that there are some nuances around timeouts since go does not offer (afaik) a way to kill an in-progress goroutine. the behavior you identified is also seen if you have non-buffered response channel, and a command which times out but doesn't fail. your run function will eventually attempt to send to the channel, blocking indefinitely since you are likely no longer selecting on it. this causes goroutine leaks.
you do highlight a great point that we have nothing that will block the fallback from executing twice which is clearly an error. i'm going to use this issue to track that we need to change that behavior
- prevent post-timeout errors from triggering fallback
from hystrix-go.
fixed by #29
from hystrix-go.
Related Issues (20)
- Callback on Circuit State Change HOT 1
- Does the project have a maintainer? HOT 4
- How to update config an runtime? HOT 1
- function trap
- can this package update to go mod?
- A little confusion of Lock
- A few questions...
- High memory usage issues
- can hystrix-go add config at runtime? hystrix.ConfigureCommand HOT 1
- Get the original error? HOT 1
- circuit may open even though ErrorPercentThreshold is bigger than 100
- method executed within hystrix behaving weiredly
- Incorrect build instructions
- Prometheus support for metric collection HOT 1
- How to not set MaxConcurrentRequests?
- Provide context for runFunc which is cancelled during timeouts HOT 2
- Panic when Timeout if setup output variable in function
- metricExchange.Monitor and poolMetrics.Monitor goroutine leak
- I need name info in Update func Callback
- I find the hystrix has an erro, I use hystrix.Do method in my code, once the hystrix circuit is open, it will runs the runFunc and fallbackFunc forever. In my understanding, once the circuit is open, the code will run fallbackFunc unless the SleepWindow is open. I find another question is the code will lead to memory leak
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hystrix-go.