Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: websockets Rust SDK doesn't error on large queries #2965

Open
2 tasks done
AlexFrid opened this issue Nov 10, 2023 · 0 comments
Open
2 tasks done

Bug: websockets Rust SDK doesn't error on large queries #2965

AlexFrid opened this issue Nov 10, 2023 · 0 comments
Assignees
Labels
bug Something isn't working topic:rust This is related to the Rust embedded library topic:stability This is related to stability issues: abnormal resource usage, unexpected errors, etc

Comments

@AlexFrid
Copy link

Describe the bug

when doing a select * from a table with 1m+ records, I get the error
Error: Api(InternalError("receiving on a closed channel")

With this error in the logs
WebSocket error: Error { inner: Io(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }) }

Steps to reproduce

Run this code on large table, 1m+ records

use surrealdb::engine::remote::ws::Ws;
use surrealdb::opt::auth::Root;
use surrealdb::Surreal;

#[tokio::main]
async fn main() -> surrealdb::Result<()> {
    // Connect to the server
    let db = Surreal::new::<Ws>("127.0.0.1:8000").await?;

    // Signin as a namespace, database, or root user
    db.signin(Root {
        username: "root",
        password: "root",
    })
    .await?;

    // Select a specific namespace / database
    db.use_ns("test").use_db("test").await?;

    // Perform a custom advanced query
    let groups = db
        .query("SELECT * from person")
        .await?;
    println!("{:#?}", groups);

    Ok(())
}

Expected behaviour

Ideally return the data, alternatively a more descriptive error explaining why it didn't work.

SurrealDB version

1.0.0+20230913.54aedcd for macos on aarch64

Contact Details

alexander.fridriksson@surrealdb.com

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AlexFrid AlexFrid added bug Something isn't working triage This issue is new labels Nov 10, 2023
@rushmorem rushmorem removed the triage This issue is new label Nov 10, 2023
@kearfy kearfy added topic:rust This is related to the Rust embedded library topic:stability This is related to stability issues: abnormal resource usage, unexpected errors, etc labels Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic:rust This is related to the Rust embedded library topic:stability This is related to stability issues: abnormal resource usage, unexpected errors, etc
Projects
None yet
Development

No branches or pull requests

3 participants