in_tail: Use temp table on overflowing the limit of SQL statement#11383
in_tail: Use temp table on overflowing the limit of SQL statement#11383
Conversation
📝 WalkthroughWalkthroughThe change addresses SQLite variable limit failures when monitoring large numbers of files (55,000+) by introducing an alternative stale inode cleanup path using a temporary table instead of a single NOT IN statement with thousands of placeholders. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
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 |
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
8476ca3 to
704ea89
Compare
in_tail plugins will fail to start when exceeded the number of placeholders for deleting inodes on DB.
So, this PR introduces an offloading operation which creates temp table and runs deletions with it.
Closes #11272
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:
Prepare massive amount of files.
This change can detect this type of overflow and use temp database to drop the definitions beyond the number of limit of SQLite's placeholders.
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