-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.1.1
-
Component/s: None
-
Environment:- macos 10.15.6
- parallels desktop 15 vm
- debian 10.5
- rustc 1.46.0 (04488afe3 2020-08-24)
- cargo 1.46.0 (149022b1d 2020-07-17)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Application is built on top of actix-web 3.0.1 accessing mongodb via 1.1.1 driver.
when building the application with cargo, building process stuck on one line of code.
#[post("/search_username")] pub(crate) async fn query_user( mongo_conn: Data<Client>, form: web::Form<Username> ) -> HttpResponse { let username = &form.username; let collection = mongo_conn.database("ngiam-db").collection("userEntity"); let filter = doc! {"username":username}; let fo = FindOptions::builder() .projection(doc! {"username":1, "displayName":1, "groupChain":1, "_id":0}) .build(); let cursor = collection.find(filter, fo).await; <--- this line unimplemented!() }
strace cargo build shows
stuck rustc process eventually exhaust all memory.
This issue can be avoided by switching to async-std runtime.
Complete dependencies as follow
- duplicates
-
RUST-597 Running a mongodb query from an actix-web handler fails to build on rust's stable-x86_64-unknown-linux-gnu toolchain.
-
- Closed
-