Skip to content
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

Wait longer for rename lock contention to resolve #97

Merged
merged 1 commit into from Nov 2, 2016

Conversation

Projects
None yet
2 participants
@sam-github
Copy link
Contributor

sam-github commented Oct 21, 2016

Anti-virus software on Windows can lock files for long periods of time,
and graceful-fs was only waiting up to a second, and busy-looping during
that wait, which has the potential to starve the locker of CPU.

Fixes npm/npm#12059

fs$rename(from, to, CB);
}, backoff)
if (backoff < 100)
backoff += 10;

This comment has been minimized.

@isaacs

isaacs Oct 26, 2016

Owner

Shouldn't there be a return here? Otherwise it'll call the callback on every iteration of the retry.

This comment has been minimized.

@sam-github

sam-github Oct 26, 2016

Author Contributor

Yes, I'm sorry. @aldenchan, take notice of above, I pushed a fixup.

Wait longer for rename lock contention to resolve
Anti-virus software on Windows can lock files for long periods of time,
and graceful-fs was only waiting up to a second, and busy-looping during
that wait, which has the potential to starve the locker of CPU.

@sam-github sam-github force-pushed the sam-github:fix-av-wait-times branch from e9e1cdb to 59145ce Oct 26, 2016

@isaacs isaacs merged commit 59145ce into isaacs:master Nov 2, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sam-github

This comment has been minimized.

Copy link
Contributor Author

sam-github commented Nov 3, 2016

Thank you, @isaacs

@sam-github

This comment has been minimized.

Copy link
Contributor Author

sam-github commented Nov 3, 2016

Any idea what the timeline is for this to be available via npm?

othiym23 added a commit to npm/npm that referenced this pull request Nov 3, 2016

graceful-fs@4.1.10
Better backoff for EPERM on Windows.

Credit: @sam-github
Fixes: #12059
Reviewed-By: @othiym23
Reviewed-By: @isaacs
PR-URL: isaacs/node-graceful-fs#97

othiym23 added a commit to npm/npm that referenced this pull request Nov 4, 2016

graceful-fs@4.1.10
Better backoff for EPERM on Windows.

Credit: @sam-github
Fixes: #12059
Reviewed-By: @othiym23
Reviewed-By: @isaacs
PR-URL: isaacs/node-graceful-fs#97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.