Skip to content

Panics in query_result #220

@serega

Description

@serega

Get occasional panics in query_result

thread 'tokio-runtime-worker' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/clickhouse-rs-1.1.0-alpha.1/src/types/query_result/mod.rs:93:44:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

will set RUST_BACKTRACE to get more info. The program makes a single call repeatedly in a loop, so it looks roughly as so

async fn fetch_data(client: &mut ClientHandle) -> Result<...> {
 let block = client
        .query(query.as_str())
        .fetch_all().await?;
...
}

let mut handle = self.client.get_handle().await.unwrap();
loop {
    let data = fetch_data(&mut handle);
    ...
}

The crash is not frequent. It may work for a couple of hours or couple of days before crashing. There were no errors reported from previous query calls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions