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

Race condition with configstore #68

Closed
blakeembrey opened this issue Dec 22, 2015 · 7 comments
Closed

Race condition with configstore #68

blakeembrey opened this issue Dec 22, 2015 · 7 comments

Comments

@blakeembrey
Copy link

From typings/typings#80 (comment).

I'm not the original author, see linked issue, but it appears some sort of race condition might be occurring when checking for updates in multiple processes that are being spawned. If this is the case, a solution might be to set the config store before running the check, then having subsequent stores use the latest config to check if a different check script is already currently executing. This would avoid having multiple updates executing at once, though I can't tell if it'd solve the core issue.

@sindresorhus
Copy link
Owner

I don't have the time right now to look into this, but it sounds like an issue with write-file-atomic. It should be able to handle concurrent operations. That's the whole point of that module. Probably worth opening an issue over there.

@timjroberts What Node.js version are you on?

@timjroberts
Copy link

@sindresorhus We're using Node 4.0.0

@SimenB
Copy link
Contributor

SimenB commented Mar 31, 2016

@sindresorhus this is probably the same issue I had in sindresorhus/del-cli#7, as del was invoked via npm-run-all in parallel. Should I still create a new issue?

@sindresorhus
Copy link
Owner

@SimenB Are you using it from multiple processes?

@SimenB
Copy link
Contributor

SimenB commented Mar 31, 2016

Updated my comment, but yes, we're using npm-run-all in parallel

@sindresorhus
Copy link
Owner

Alright. It seems pretty clear now this is a write-file-atomic race issue. Could you open an issue there? (And link to this one from there. Make sure to include your error and stack trace).

@sindresorhus
Copy link
Owner

Fixed by npm/write-file-atomic#13.

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

No branches or pull requests

4 participants