fs: enable chunked reading for large files in readFileHandle#56022
fs: enable chunked reading for large files in readFileHandle#56022mertcanaltin wants to merge 5 commits into
Conversation
|
I wonder if I should apply this sorting in in addition there are still places that use |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #56022 +/- ##
=======================================
Coverage 90.24% 90.24%
=======================================
Files 741 741
Lines 241384 241385 +1
Branches 45480 45480
=======================================
+ Hits 217844 217849 +5
+ Misses 15097 15089 -8
- Partials 8443 8447 +4
🚀 New features to boost your workflow:
|
|
I removed the limit test because the limit for reading large files exceeding the GiB limit with fs.readFile has been removed. |
19dc0c4 to
6c85d68
Compare
6c85d68 to
ed82387
Compare
|
I added the tsc label to discuss, if we want to allow users to read such big files into memory, or if it would be better to try to point out streams instead. |
BridgeAR
left a comment
There was a problem hiding this comment.
The error is removed from the promise version but it's missing the callback readFile implementation. The error itself would not be needed anymore due to that and also has to be removed.
This has to be addressed before we could land this.
We discussed in the TSC meeting that it's not a good idea to read beyond that, while it's acceptable for some cases.
We also discussed around warning when reaching that limit instead. We did not yet have consensus around it, but we'll discuss it again next week to finish the decision for that.
|
just wondering what is the next action here - @BridgeAR |
|
@gireeshpunathil I believe you wanted to think about the warning again. I kept my change request since the implementation should also include the callback version next to the warning. That's currently missing :) |
thanks a lot for your comments, unfortunately I saw this place late and now I sent a commit for the callback version |
BridgeAR
left a comment
There was a problem hiding this comment.
The original reason for the limit was AFAIK something about some systems on some versions not being able to read that file size. If that's the case, we'd have to handle chunking on our side. I am just not certain if that still applies or if it's a legacy issue.
Please also add the warning instead of the error.
I thought we are going to continue the discussion in the TSC on the necessity of the warning, as we didn't converge on that IIRC. |
|
this test was successful on my local linux machine |
d684310 to
9dfd3b3
Compare
|
Added baking for lts label to wait backporting this. |
Signed-off-by: Mert Can Altin <mertgold60@gmail.com>
|
Hi, I solved the conflict. @mcollina, maybe you want to look. |
Signed-off-by: Mert Can Altin <mertgold60@gmail.com>
|
for failed heavy senario (5GIB) in parallel test, I moved heavy test a separate pummel. fail: https://github.com/nodejs/node/actions/runs/29168561775/job/86585920007?pr=56022 |
Added chunked reading support to readFileHandle to handle files larger than 2 GiB, resolving size limitations while preserving existing functionality.
#55864