Skip to content

fix: Multiple potential issues with the tcp DNS client #32636

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

Merged
merged 8 commits into from
Feb 3, 2025

Conversation

johanandren
Copy link
Contributor

  • Actually handle backpressure from TCP actor
  • Handle that multiple responses may arrive in partial form
  • Always terminate if connection actor terminates unexpectedly

Continuation of #32635

@leviramsey
Copy link
Contributor

LGTM

Copy link
Contributor

@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

} else {
val oldest = requestBuffer.head
val newRequestBuffer = requestBuffer.tail :+ msg
log.warning("Dropping oldest buffered DNS request [{}] due to TCP backpressure", oldest)
Copy link
Contributor

Choose a reason for hiding this comment

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

ok to log the ByteString? anything sensitive in those?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's the DNS query Message, I can't think of any way that would be sensitive (and that we don't already log in a ton of places)

@johanandren johanandren merged commit e17d1cd into main Feb 3, 2025
5 checks passed
@johanandren johanandren deleted the wip-tcp-dns-improvements-contd branch February 3, 2025 16:10
sebastian-alfers pushed a commit to sebastian-alfers/akka that referenced this pull request Feb 4, 2025
* fix: improve TCP DNS client interactions with TCP actor
* ensure that TCP connection is closed when TcpDnsClient fails
* Fix for potential re-order of response bytes during high load
* Deathwatch the connection to make sure we are never stuck in a broken state
---------

Co-authored-by: Levi Ramsey <levi.ramsey@alum.cs.umass.edu>
johanandren added a commit that referenced this pull request Feb 4, 2025
* fix: improve TCP DNS client interactions with TCP actor
* ensure that TCP connection is closed when TcpDnsClient fails
* Fix for potential re-order of response bytes during high load
* Deathwatch the connection to make sure we are never stuck in a broken state
---------

Co-authored-by: Johan Andrén <johan@markatta.com>
Co-authored-by: Levi Ramsey <levi.ramsey@alum.cs.umass.edu>
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.

3 participants