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

fix: Don't log peer closing connection at error #1745

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

johanandren
Copy link
Member

Downstream fix for akka/akka-http#4041

As we don't have information about how to reproduce, matching the logged error message is the best I could do and I think this is where the exception is logged at error.

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

private def default(system: ActorSystem): jFunction[Throwable, Trailers] =
private def default(system: ActorSystem): jFunction[Throwable, Trailers] = {
val log = Logging(system, "akka.grpc.javadsl.GrpcExceptionHandler")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't called repeatedly, which would add overhead of creating logger?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Kalix proxy we create the partial function once at bootstrap (Serve.createRoute) and re-use for all calls, so a slight optimization for the peer closed and unexpected error scenarios. Not very important though.

@johanandren johanandren merged commit b8c0bd1 into main Jan 24, 2023
@johanandren johanandren deleted the wip-log-peer-closed-at-warning branch January 24, 2023 13:29
@johanandren johanandren added this to the 2.3.0-M2 milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants