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

DnsNameResolver: Fail query if id space is exhausted #13784

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

normanmaurer
Copy link
Member

@normanmaurer normanmaurer commented Jan 17, 2024

Motivation:

When we try to execute a query we will try to select / generate an id that is used. When we are not able to find one we throw an IllegalStateException. In this case we also need to ensure we fail the original promise as otherwise the user might never be notified of the problem.

Modifications:

  • Move throw code out of the DnsQueryContextManager to make it easier to reason about
  • Fail query with IllegalStateException

Result:

Query will be correctly failed in the case of id space exhausting

Motivation:

When we try to execute a query we will try to select / generate an id that is used. When we are not able to find one we throw an IllegalStateException. In this case we also need to ensure we fail the original promise as otherwise the user might never be notified of the problem.

Modifications:

- Move throw code out of the DnsQueryContextManager to make it easier to reason about
- Fail query with IllegalStateException

Result:

Query will be correctly failed in the case of id space exhausting
Copy link
Contributor

@bryce-anderson bryce-anderson left a comment

Choose a reason for hiding this comment

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

Promise leaks are tough.

@normanmaurer normanmaurer merged commit 0e7c27c into 4.1 Jan 17, 2024
15 checks passed
@normanmaurer normanmaurer deleted the id_space_exhaust branch January 17, 2024 19:19
normanmaurer added a commit that referenced this pull request Jan 18, 2024
Motivation:

When we try to execute a query we will try to select / generate an id
that is used. When we are not able to find one we throw an
IllegalStateException. In this case we also need to ensure we fail the
original promise as otherwise the user might never be notified of the
problem.

Modifications:

- Move throw code out of the DnsQueryContextManager to make it easier to
reason about
- Fail query with IllegalStateException

Result:

Query will be correctly failed in the case of id space exhausting
franz1981 pushed a commit to franz1981/netty that referenced this pull request Feb 9, 2024
Motivation:

When we try to execute a query we will try to select / generate an id
that is used. When we are not able to find one we throw an
IllegalStateException. In this case we also need to ensure we fail the
original promise as otherwise the user might never be notified of the
problem.

Modifications:

- Move throw code out of the DnsQueryContextManager to make it easier to
reason about
- Fail query with IllegalStateException

Result:

Query will be correctly failed in the case of id space exhausting
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.

None yet

3 participants