ydb-rs-sdk icon indicating copy to clipboard operation
ydb-rs-sdk copied to clipboard

bug: empty endpoint list for service: table_service

Open sshaplygin opened this issue 3 months ago • 1 comments

Bug Report

Describe the bug

I got error with use table_client: empty endpoint list for service: table_service at the Yandex Cloud environment

To Reproduce Steps to reproduce the behavior:

  1. Go to:
  • Create database at the Yandex Cloud with serverless option.
  • I used next code to init client:
pub async fn init_db(connection_key: String, env: Environment) -> ydb::YdbResult<ydb::Client> {
    let conn_string = std::env::var(connection_key).expect("connection string must be set");

    let mut client_builder: ClientBuilder =
        ydb::ClientBuilder::new_from_connection_string(conn_string)?;

    client_builder = match env {
        Environment::Production => client_builder.with_credentials(MetadataUrlCredentials::new()),
        _ => client_builder
            .with_credentials(CommandLineCredentials::from_cmd("yc iam create-token")?),
    };

    let client = client_builder.client()?;

    client.wait().await?;

    Ok(client)
}
  1. Run code:

call example https://github.com/sshaplygin/urlshortener/blob/main/src/main.rs#L227-L246

  1. See error:

called Result::unwrap() on an Err value: Custom("empty endpoint list for service: table_service")

Expected behavior:

Environment (please complete the following information):

  • OS: linux/amd64, debian 13.0-slim
  • Rust version: 1.89.0
  • SDK version: 0.9.11
  • YDB Server version (if known):

Additional context

sshaplygin avatar Aug 24 '25 14:08 sshaplygin

I assume that this happens because the wait at client.wait().await? operation doesn't really wait for all the necessary data to reach the RandomLoadBalancer discovery_state after set_discovery_state operation.

i fixed at my code with add extra timeout for init operation

sshaplygin avatar Aug 24 '25 17:08 sshaplygin