scylladb / scylla-rust-driver

Async CQL driver for Rust, optimized for ScyllaDB!
Apache License 2.0
582 stars 101 forks source link

Misleading error when using nonexistent DC #747

Open Lorak-mmk opened 1 year ago

Lorak-mmk commented 1 year ago

When using DefaultPolicy::builder().prefer_datacenter(dc) with nonexistent datacenter the driver returns a very misleading erro when trying to execute a query: Error: ProtocolError("Empty query plan - driver bug!").

Full reproducer: https://github.com/fee-mendes/rust-driver-example/blob/main/metric-collector Driver version: 0.8.1, as can be seen in above reproducer.

To reproduce, simply run cargo run --bin metric-collector <scylla_ip> this_dc_does_not_exist

samuelorji commented 1 year ago

stab: https://github.com/scylladb/scylla-rust-driver/pull/825