fix: keep packing the queue head when the job table is full - #461
Open
official-burak wants to merge 1 commit into
Open
fix: keep packing the queue head when the job table is full#461official-burak wants to merge 1 commit into
official-burak wants to merge 1 commit into
Conversation
Hardlinks in later subdirs can fill the read-ahead table while the head is still pending. PROCESS then skipped the head, so nothing was piped, JOBS never dropped, and async pack/create hung until the event loop drained (exit 0 with a truncated archive). Fixes isaacs#460
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardlinks in later subdirs can fill the async pack job table while the queue head is still pending.
PROCESSthen skipped the head becauseJOBSwas already at the limit, so nothing was piped,JOBSnever dropped, and the pack never ended.create({ file })hit the same stall: the promise never settled, the event loop drained, and Node exited 0 with a truncated archive.Always run
PROCESSJOBon the head even when the read-ahead table is full. Later jobs stay gated byjobs.Fixes #460
Test plan
Packstream andcreate({ file })both timed out at 8s)Linkentriesnpx tap test/pack.js test/create.ts(758 pass), including the existing hardlink timing tests