input_chunk: input_log: in_storage_backlog: address underflowing / overflowing chunk limit size - #12299
input_chunk: input_log: in_storage_backlog: address underflowing / overflowing chunk limit size#12299cosmo0920 wants to merge 4 commits into
Conversation
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change adds bounded filesystem chunk accounting for input outputs and storage backlog. Signed chunk-size deltas prevent invalid negative-size calculations. Routing, cleanup, eviction, and backlog updates now use guarded subtraction and saturating addition. Regression coverage validates these cases. ChangesChunk accounting safety
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change prevents chunk-size accounting from wrapping during underflow or overflow and keeps negative adjustments subtractive; no actionable merge-blocking risk remains after normal checks and review. Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2dd1c8f4b5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Implemented general filesystem chunk-accounting guards.
fs_chunks_sizenow uses saturating subtraction: underflow logs a warning and resets the counter to zero instead of wrapping nearSIZE_MAX.SIZE_MAX.fs_backlog_chunks_sizehas equivalent guards and subtracts the size recorded when the backlog entry was created.input_chunk_routes.c.Verification:
cmake --build build --target fluent-bit-bin flb-it-input_chunk_routes— passed.ctest --test-dir build -R '^flb-it-input_chunk_routes$' --output-on-failure— 1 passed..venv\Scripts\python.exe -m pytest scenarios/in_forward/tests/test_in_forward_001.py -q -k storage_limit— 2 passed, 1 platform skip..venv\Scripts\python.exe -m pytest scenarios/in_storage_backlog/tests/test_in_storage_backlog_001.py -q— 2 passed, 2 platform skips.git diff --check— passed.Closes #12220.
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
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
Bug Fixes
Tests