Skip to content

Fix race-condition with multiple workers #206

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

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

obelloc
Copy link

@obelloc obelloc commented Aug 4, 2025

When running ssg with multiple workers, different forked processes might check for an existing folder and attempt to create it "simultaneously", which will cause makeDirectory to fail (folder already exists) and ssg to abort.

The fix uses 'force' to ignore errors on makeDirectory(). If it fails with errors other than 'folder already exists', then the following put() should also fail, meaning, it won't go unnoticed.

When running ssg with multiple workers, different forked processes might check
for an existing folder and attempt to create it "simultaneously",
which will cause makeDirectory to fail (folder already exists) and ssg to abort.

The fix uses 'force' to ignore errors on makeDirectory(). If it fails with errors
other than 'folder already exists', then the following put() should also fail,
meaning, it won't go unnoticed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant