edgedb / edgedb-rust

The official Rust binding for EdgeDB
https://edgedb.com
Apache License 2.0
213 stars 26 forks source link

Maximum message length causes problems #214

Closed msullivan closed 1 year ago

msullivan commented 1 year ago

The tokio version has a maximum message length of 1 MB, but it is totally plausible to need more than that.

  1. The message length breaks one of our existing dump tests, in which largeish binary blobs are stored in the database: https://github.com/edgedb/edgedb/actions/runs/4117667433/jobs/7109382549. Test is here: https://github.com/edgedb/edgedb/blob/f9691bd3da95829ce1a1d82cf39a4e257844eae2/tests/test_dump_basic.py#L71
  2. Anything that returns more than 1 MB in a single row or a JSON query that returns more than one MB total won't work:
    edgedb> select str_repeat('a', 2000000);
    edgedb error: ClientConnectionError: message length 2000014 is too long
    Reconnecting...

I think we just need to get rid of the limit. If it was just problem 2, then I wouldn't be that bothered if the rust bindings wanted a limit (though 1 MB seems quite low), but dumps absolutely need to work and the CLI uses the rust bindings for dumps.