Closed
Description
Describe the bug
In plan_fragmenter, for getting the source information(it's a async interface), we use block_on.
But that block_on will cause the woker in runtime blocked. In deterministic simulation, the runtime seems only run in a single thread, so that will cause whole program be blocked. For the block reason, we can refer:
tokio-rs/tokio-compat#23 (comment)
Solution:
- change BatchPlanFragmenter.split into a async. These solution seems impossible, because PlanRef is hard to satisfy Send,Sync trait. (BatchPlanFragmenter.split need to statisfy thread safety if we change it to a async function). Lots of thing need to modify if we take it...
- delay get source information util we schedule the fragment. (The schedule work is async so we can directly use the async operation in it)
risingwave/src/frontend/src/handler/query.rs
Line 150 in 733847f
This solution seems also impossible. We need the source information to get the parallelism, parallelism needed for creating fragment.
- I think it's a available solution. Including split information in SourceCatalog. And that we don't need async operation to get source information(including parallelism)
For the timestamp limit, we can delay it util we schedule the fragment.
To Reproduce
No response
Expected behavior
No response
Additional context
No response