-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Sequencer run with 0 threads or 0 events #4053
fix: Sequencer run with 0 threads or 0 events #4053
Conversation
This fixes the sequencer when running with 0 events (it would otherwise do a division by zero). It also adds an exception in case it's configured to run with a number that's not -1 or positive (and larger than 0)
WalkthroughHmm, improvements to the Sequencer class, we have. Enhanced error handling, the constructor now possesses. Validation of thread configuration, added it has. Zero events handling, refined the Changes
Suggested labels
Suggested reviewers
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (8)
🔇 Additional comments (2)
✨ Finishing Touches
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 (
|
We could also early return from |
@benjaminhuth I do want the Sequencer to run the initialization though. I've been using this to measure the wall time of the initialization only. I can return before we kick off the parallel for, but then that will result in exactly the same behavior as if the parallel for is over 0 entries, and it will also skip the finalize calls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
do you think it makes sense to try enhance the time measurement capabilities we have to break down the init time and the first event time similar to what is done in Athena?
Quality Gate passedIssues Measures |
This fixes the sequencer when running with 0 events (it would otherwise do a division by zero). It also adds an exception in case it's configured to run with a number that's not -1 or positive (and larger than 0) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved error handling in Sequencer constructor to prevent invalid thread configurations - Added safety check in `perEvent` function to handle zero events gracefully <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This fixes the sequencer when running with 0 events (it would otherwise do a division by zero). It also adds an exception in case it's configured to run with a number that's not -1 or positive (and larger than 0)
Summary by CodeRabbit
perEvent
function to handle zero events gracefully