Skip to content

ConfigService get_config Blocking Main Thread #241

@451846939

Description

@451846939

When using the ConfigService get_config method in the main Tokio thread, the service fails to start if the connection address is not successful.

Although I have a local default configuration and prefer to fetch configurations from a remote source first, the system should fall back to the local configuration if the remote fetch fails.

However, ConfigService get_config blocks the main thread, preventing the service from proceeding.
This issue stems from NacosGrpcConnection’s poll_ready continuously retrying. I propose adding a configurable maximum retry limit, with a default value of None to retain the original logic.

Users could set this limit as needed to control the retry behavior.

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