Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fs: remove duplicate fd validation in sync functions #61361

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

Open
mertcanaltin wants to merge 1 commit into nodejs:main
base: main
Choose a base branch
Loading
from mertcanaltin:mert/fs-optimize-sync-fd-check

Conversation

@mertcanaltin
Copy link
Member

@mertcanaltin mertcanaltin commented Jan 12, 2026
edited
Loading

I removed the repeated fd validation in synchronization functions; C++ already validates this via GetValidatedFd.

Asynchronous functions keep JS validation for error ordering.

readSync: 1,793K → 1,923K ops/sec

passed all fs tests

test-fs-read.js
test-fs-write.js
test-fs-readv-sync.js
test-fs-writev-sync.js

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Jan 12, 2026
Copy link

codecov bot commented Jan 13, 2026
edited
Loading

Codecov Report

❌ Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.53%. Comparing base (1bd7f62) to head (4abe00d).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
src/node_file.cc 20.00% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## main #61361 +/- ##
==========================================
+ Coverage 88.51% 88.53% +0.01% 
==========================================
 Files 704 704 
 Lines 208739 208732 -7 
 Branches 40274 40270 -4 
==========================================
+ Hits 184770 184795 +25 
+ Misses 15968 15942 -26 
+ Partials 8001 7995 -6 
Files with missing lines Coverage Δ
lib/fs.js 98.18% <ø> (-0.01%) ⬇️
src/node_file.cc 75.46% <20.00%> (-0.08%) ⬇️

... and 44 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@avivkeller avivkeller avivkeller approved these changes

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /