rethinkdb / rethinkdb-rs

A native RethinkDB driver written in Rust
Apache License 2.0
210 stars 27 forks source link

Changefeeds inevitably overruns their stack #42

Closed TotalKrill closed 5 years ago

TotalKrill commented 5 years ago

So after some testing where i start a changefeed, the stack will always get overrun.

I am going to guess it is due to fact that the data is never ended, thus, never discarded in the background.

*snip*
    let query = r.db("database")
        .table("changing_table")
        .changes()
        .run::<Change<DataStruct, DataStruct>>( conn ).unwrap();

    let mut wait = query.wait();
    loop {
        let val = wait.next();
        match  val {
 *snip*

This is snippet of the code I am using. Is there any other way to discard data once it is moved out of the iterator?

TotalKrill commented 5 years ago

My suspicions were correct, I managed to hunt down the stack overrun to the Request.submit() command

TotalKrill commented 5 years ago

Fix in #43