Skip to content

[Enhancement] Remove the dedicated NameServer probe thread pool #11153

Description

@qianye1001

Description

NettyRemotingClient allocates a dedicated scanExecutor for NameServer availability probes: 4 core threads, up to 10 threads, and a queue of 32 tasks. The existing housekeeping timer submits a task per address to that pool. Each task calls getAndCreateChannel(), which waits for the Netty connection future to complete.

These probes only establish or reuse connections. Netty already provides asynchronous connection completion, so the extra worker pool and task queue are unnecessary.

Expected behavior

Initiate probes directly from the existing housekeeping timer and update the available NameServer list in connection-completion callbacks. Remove the scan executor entirely, without replacing it with another executor or timer thread.

The timer must not wait for connections or a contended channel-table lock. Pending or failed connections must not be advertised as available, and late callbacks must not restore removed addresses or overwrite newer connection results. Preserve the existing scanAvailableNameSrv switch and probe interval.

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions