fix: stream files too large to read unbuffered#107
Conversation
|
Warning Review limit reached
More reviews will be available in 1 minute and 30 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
Reviewer's GuideHandles ERR_FS_FILE_TOO_LARGE when loading static files so unbuffered, dynamic mode falls back to streaming instead of crashing, and adds a regression test for this behavior. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Closes #103.
When
fs.readFileSync()reportsERR_FS_FILE_TOO_LARGE, unbuffered mode should still be able to serve the file through the existing stream path instead of crashing while trying to compute the eager MD5.This preserves the current eager hash behavior for ordinary files, rethrows other read failures, and still rethrows the too-large error when
options.bufferis enabled because that mode requires the file in memory.Verification:
./node_modules/.bin/mocha --grep 'unbuffered read is too large'npm testgit diff --checkSummary by Sourcery
Handle large files in unbuffered mode without crashing by falling back to streaming when eager reads exceed size limits.
Bug Fixes:
Tests: