-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Handle close_notify in ConnectionPoolHandler #1841
Conversation
@@ -55,6 +55,10 @@ public enum OutboundErrorType implements ErrorType { | |||
ERROR_TYPE_ORIGIN_RESET_CONN_STATUS.get(), | |||
ZuulStatusCategory.FAILURE_ORIGIN_RESET_CONNECTION, | |||
ClientException.ErrorType.CONNECT_EXCEPTION), | |||
CLOSE_NOTIFY_CONNECTION( | |||
504, |
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.
nit: This is technically the equivalent of CONNECT_ERROR
imo, which maps to a 502
vs 504
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.
Updated 👍
@@ -97,6 +99,11 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc | |||
+ reason.name() + ", " + ChannelUtils.channelInfoForLogging(ctx.channel()); | |||
closeConnection(ctx, msg); | |||
} | |||
} else if(evt instanceof SslCloseCompletionEvent event) { |
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.
👍🏼
@@ -58,6 +60,7 @@ public ConnectionPoolHandler(OriginName originName) { | |||
this.inactiveCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_inactive", originName.getMetricId()); | |||
this.errorCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_error", originName.getMetricId()); | |||
this.headerCloseCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_headerClose", originName.getMetricId()); | |||
this.sslCloseCompletionCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_sslClose", originName.getMetricId()); |
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.
🙏🏼
I also added a new status category to differentiate this failure from connection resets