fix: set close-on-exec on log file descriptors - #405
Conversation
Signed-off-by: drifting-shard <amitsharma0843@gmail.com>
|
Hi @drifting-shard. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @drifting-shard! |
|
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 (1)
📝 WalkthroughWalkthroughUnix log file opening and creation now include ChangesLog file descriptor flags
Estimated code review effort: 2 (Simple) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LykxSassinator, tabokie The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What changed
Set
O_CLOEXECwhen opening and creating log files in the defaultUnix backend.
Without this flag, applications embedding Raft Engine can leak log file
descriptors into spawned child processes. Those children may keep purged
files alive after unlinking, preventing disk space from being reclaimed.
The flag is applied at open time to avoid the fork/exec race in
multithreaded applications.
Fixes #404
Tests
cargo fmt --checkcargo check --libThe full test suite was not run locally because the bundled
grpcio-sysdependency fails to build on ARM macOS. GitHub Actions runs it on Ubuntu.
Summary by CodeRabbit