fix(concurrent): Ensure default concurrency level does not generate deadlock#148
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request involve significant updates to the Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
👮 Files not reviewed due to content moderation or server errors (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Brian Lai (brianjlai)
left a comment
There was a problem hiding this comment.
a couple questions! but makes sense!
Given a stream that has a lot of partitions, we can end up in a case where the only thread (which is a PartitionEnqueuer that is generating partition) can't generate more partitions because they are not consumed.
This comment explains how we limit the number of partitions being generated. Basically, every time we try to add a partition to the list of partitions ready to be consumed, we do this:
The locks on this algorithm seems approximative hence why we have this log in case we really go too much over it:
The current limit is 10 000 threads waiting in the queue.
In order to prevent if nothing is configured, we will set the default to 2 threads.
Summary by CodeRabbit