Skip to content

Replace Java DNS resolver with Netty DNS resolver to avoid test timeouts #4585

Description

@nodece

Some BookKeeper tests occasionally fail due to long delays in reverse DNS lookups. The root cause is the use of InitialDirContext.getAttributes() in org.apache.bookkeeper.net.DNS#reverseDns, which can block for up to 120 seconds if DNS resolution hangs. This leads to flaky or timing-out tests such as:

To improve reliability, we should replace the current blocking implementation with Netty's asynchronous DNS resolver. This will allow us to set timeouts, avoid blocking test threads, and reduce flakiness.

Test with Netty DNS:

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions