Skip to content

DnsNameResolver: Fail query if id space is exhausted#13784

Merged
normanmaurer merged 1 commit into4.1from
id_space_exhaust
Jan 17, 2024
Merged

DnsNameResolver: Fail query if id space is exhausted#13784
normanmaurer merged 1 commit into4.1from
id_space_exhaust

Conversation

@normanmaurer
Copy link
Copy Markdown
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
Copy Markdown
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
@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.

3 participants