Open tqwewe opened 10 months ago
Oh I realize its because I spawn the tasks but immediately exit my main
function without waiting for them to complete, which I guess breaks the This unwrap is safe because: That future is polled in a tokio::task which isn't going to be cancelled
assumption.
I guess one solution might be to do:
let pages_received = receiver.recv().await.unwrap_or_else(|| Err(QueryError::...))?;
Alternatively this can also be ignored since it only panics if the tokio runtime exits.
This is actually the second time this issue is reported (https://github.com/scylladb/scylla-rust-driver/issues/615). I think we shouldn't close it until we improve the panic message or return a proper error instead of panicking.
I suggest resolving this by calling expect("The future returned by worker.work was cancelled instead of performing graceful shutdown")
instead of unwrap
ping.
When using
execute_iter
concurrently intokio::spawns
, I sometimes encounter anunwrap
panic from Scylla. The unwrap causing the panic is in thenew_from_worker_future
function here: https://github.com/scylladb/scylla-rust-driver/blob/99330c8531392c24478e33a5a576780e25680aa1/scylla/src/transport/iterator.rs#L402-L407A reproduction can be found here: https://github.com/thalo-rs/thalo/tree/scylladb-event-store in branch
scylladb-event-store
at commit7946eed5593cd07e4d6c58601e9351766b41e38c
You'll need to build the
counter.wasm
module usingthalo_cli
, and then runcargo r -p thalo_runtime
.