This is a reproducable example of streaming a file using meilisearch's new CSV features.
- Clone this gist
$ git clone [email protected]:cdaa113505dcca334372b18896381266.git meili-panic
$ cd meili-panic
- Start meilisearch with
docker compose up --wait
- Run the program
cargo run --release
- Observe errors
2023-10-20T23:36:48.526475Z DEBUG isahc::agent: agent took 77.397µs to start up
at /home/carter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/isahc-1.7.2/src/agent/mod.rs:125 on isahc-agent-0
in isahc::agent::agent_thread with id: 0
2023-10-20T23:36:48.526603Z DEBUG isahc::handler: Trying [::1]:7700...
at /home/carter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/isahc-1.7.2/src/handler.rs:653 on isahc-agent-0
in isahc::handler::handler with id: 0
in isahc::client::send_async with method: POST, uri: http://localhost:7700/indexes/testing/documents?primaryKey=id
2023-10-20T23:36:48.526682Z DEBUG isahc::handler: Connected to localhost (::1) port 7700
at /home/carter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/isahc-1.7.2/src/handler.rs:653 on isahc-agent-0
in isahc::handler::handler with id: 0
in isahc::client::send_async with method: POST, uri: http://localhost:7700/indexes/testing/documents?primaryKey=id
thread 'isahc-agent-0' panicked at /home/carter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/fs/file.rs:545:47:
there is no reactor running, must be called from the context of a Tokio 1.x runtime
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2023-10-20T23:36:48.527777Z ERROR isahc::agent: agent shut down with error: Error { kind: Unknown, context: None, source: Some(MultiError { description: "Operation was aborted by an application callback", code: 11 }), source_type: Some("curl::error::MultiError"), local_addr: None, remote_addr: None }
at /home/carter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/isahc-1.7.2/src/agent/mod.rs:130 on isahc-agent-0
in isahc::agent::agent_thread with id: 0
Error: HTTP request failed: unknown error
[2023-10-20T23:38:01Z DEBUG meilisearch::routes::indexes::documents] called with params: AwebQueryParameter(UpdateDocumentsQuery { primary_key: Some("id"), csv_delimiter: None }, PhantomData<*const meilisearch_types::deserr::DeserrError<meilisearch_types::deserr::DeserrQueryParam, meilisearch_types::error::deserr_codes::BadRequest>>)
[2023-10-20T23:38:01Z DEBUG actix_web::middleware::logger] Error in response: ResponseError { code: 400, message: "A csv payload is missing.", error_code: "missing_payload", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#missing_payload" }
[2023-10-20T23:38:01Z INFO actix_web::middleware::logger] 172.21.0.1 "POST /indexes/testing/documents?primaryKey=id HTTP/1.1" 400 150 "-" "Meilisearch Rust (v0.24.2)" 0.000790