-
-
Notifications
You must be signed in to change notification settings - Fork 736
Improve schedule engine performance #2191
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
Conversation
|
WalkthroughThis change introduces new log level configuration options for three worker categories—legacy run engine worker, common worker, and alerts worker—by extending the environment schema to accept log level values from environment variables, defaulting to "info". The logging level for each worker is now dynamically set from these environment variables instead of being hardcoded. The default concurrency settings for the schedule worker are increased, with the number of workers raised from 1 to 2 and tasks per worker from 1 to 10. Additional worker concurrency parameters are added to the schedule engine, and distributed execution time calculation now supports an optional instance identifier and uses the FNV-1a 32-bit hash algorithm. Worker loops are staggered with delays based on their index and enhanced with detailed logging for improved observability. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (10)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (18)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
Fixed the calculation for distributing schedules across the "calculation window" timeframe to include the schedule instanceId in the random seed and not just the schedule time, which was causing all schedules to be "distributed" into the exact same timestamp (not good).
Also fixed an issue where the schedule engine
workers
andtasksPerWorker
options were not being passed down to the internal RedisWorker, causing the defaults of1
and10
to be used.I also added some additional logging into RedisWorker and also spaced-out the starting times of each run worker loop.