Skip to content

Will the tasks be starved due to so many tasks? #7198

Answered by niebayes
niebayes asked this question in Q&A
Discussion options

You must be logged in to vote

It's now clear what makes tasks hang. Tonic does not really support lazy stream.
When we create a cross-node stream through the Arrow Flight protocol, which is based on grpc supported by tonic, the stream is eagerly polled by tonic in the server side, however, not lazily polled by the client.
Therefore, if the number of streams is large and each stream contains a large amount of data, then the server side would eagerly consume all streams in parallel.
I'm not sure the direct reason that makes tokio tasks hang. But after we enforce the stream being consumed in a lazy way, the tasks won't hang.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@niebayes
Comment options

Comment options

You must be logged in to vote
4 replies
@Darksonn
Comment options

@niebayes
Comment options

@Darksonn
Comment options

@niebayes
Comment options

Answer selected by niebayes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants