-
Notifications
You must be signed in to change notification settings - Fork 1.9k
engine: fix endless loop on reload #10671
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
Signed-off-by: Siarhei Rasiukevich <s.rasiukevich@gmail.com>
WalkthroughThe change in Changes
Sequence Diagram(s)sequenceDiagram
participant Engine
participant ShutdownTimer
Engine->>Engine: Detect FLB_ENGINE_SHUTDOWN event
Engine->>ShutdownTimer: Keep timer active (no destruction)
Engine->>Engine: Process pending tasks and chunks
Engine->>ShutdownTimer: Destroy timer (after tasks/chunks processed)
Engine->>Engine: Complete shutdown and exit
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
🪧 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 (
|
|
@CharlieR-o-o-t thank you ! |
|
Hello @edsiper , |
|
Ah, sorry. I've overlooked for this PR. I sent a backport PR in #10709. |
Thank you for including this PR in v4.0.8! Could you please let me know if there is an estimated release date for this version? |
|
one more PR to fix: #10720 @cosmo0920 , could you take a look? that's important fix. |
Fix endless loop on fluent-bit reload.
Fixes #10670, #10518, #9927, #9354
Short description:
mk_event_timeout_destroy() should be called only after flb_engine_shutdown(). Otherwise, the shutdown timer will be removed right after the chunk retry finishes. This may cause all inputs to stop, the engine to become blocked during reloads, and the shutdown logic to never be triggered because config->shutdown_fd was already released.
Testing
I have reported bug #10670 , it well documented with exact steps to reproduce.
Tested
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit