Open teenjuna opened 1 year ago
I should also note that if I change product.price.discount
to be <future>
, it also works in CLI, but overflows in SDK:
DEFINE FIELD price.discount ON product
VALUE <future> { RETURN fn::product::discount(id) };
The CLI also uses the SDK @teenjuna. I think it's not happening in the CLI because it increases the stack size.
I kind of suspected that, but didn't think that my query is that complex. Perhaps this should be mentioned in docs in the next release? Anyway, thank you, @rushmorem. The issue I mentioned above might require the same fix on user-side. Should I close this now?
That's a good idea @teenjuna. I think we should hold off closing this until it's either documented or we find a way to fix it somehow. Ideally I would hope for the latter. Trying to determine whether a query might or might not need a bigger stack size ahead of time sounds like a pain.
I also ran into this when trying to get the result of a recursive function back from the sdk, and increasing the stack size fixed it (thank you!)
Worth noting that when using #[tokio::test]
it runs in the single thread runtime by default, which could also cause similar issues as noted here
Describe the bug
I was trying to implement a schema, where one of the table's fields returns a value from a graph query. It works nicely on in-memory CLI repl, but when used inside Rust SDK (tested kv-mem and kv-rocksdb), this error is returned:
Both CLI and Rust SDK are latest stable 1.0. I also tried Rust SDK from
master
, the issue stays the same.Steps to reproduce
This the schema and sequence of statements:
Expected behaviour
Rust SDK should not overflow.
SurrealDB version
1.0.0+20230913.54aedcd for macos on aarch64
Contact Details
No response
Is there an existing issue for this?
Code of Conduct