Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panics in query_result #220

Open
serega opened this issue Jun 3, 2024 · 0 comments
Open

Panics in query_result #220

serega opened this issue Jun 3, 2024 · 0 comments

Comments

@serega
Copy link

serega commented Jun 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant