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

feat: Mark bridge unhealthy based on restart requests from endpoints #1210

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
log: Log if endpoints count becomes negative.
  • Loading branch information
bgrozev committed Feb 12, 2025
commit f825ce9f1c99c8e42cfc38ae1bcd7338f1f519a3
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ class Bridge @JvmOverloads internal constructor(
fun endpointRemoved() = endpointsRemoved(1)
fun endpointsRemoved(count: Int) {
endpoints.addAndGet(-count)
if (endpoints.get() < 0) {
logger.error("Removed more endpoints than were allocated. Resetting to 0.", Throwable())
endpoints.set(0)
}
}
fun endpointRequestedRestart() {
endpointRestartRequestRate.update(1)
Expand Down