-
Notifications
You must be signed in to change notification settings - Fork 46
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
add a request limit for tier2 service, if reached service sets itself as not ready. #402
Conversation
service/tier2.go
Outdated
overloaded = false | ||
} | ||
if overloaded { | ||
defer s.connectionCountMutex.Unlock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no defer!
service/tier2.go
Outdated
@@ -121,6 +126,26 @@ func (s *Tier2Service) ProcessRange(request *pbssinternal.ProcessRangeRequest, s | |||
var err error | |||
ctx := streamSrv.Context() | |||
|
|||
overloaded := true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverse this logic (default: false)
service/tier2.go
Outdated
defer func() { | ||
s.connectionCountMutex.Lock() | ||
s.currentConcurrentRequests-- | ||
s.setReadyFunc(s.runtimeConfig.MaxConcurrentRequests == 0 || s.currentConcurrentRequests < s.runtimeConfig.MaxConcurrentRequests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transform this into a function (use same as line 131)
Add to CHANGELOG |
cf73f25
to
c21aca1
Compare
TODO: add the prometheus metrics for active requests on a tier2 in our graphs |
TODO: ensure that the tier1 never fails on tier2 unavailable (I think there's a retry counter limit...) |
as discussed