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

iso9660 and squashfs support for parallel writings #245

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

deitch
Copy link
Collaborator

@deitch deitch commented Aug 2, 2024

Fixes #244

The iso finalization originally was written without parallelism in mind. Most of it works fine. The inly issue was walking the workspace to finalize. Because it is easier to work with relative paths, it did a os.Chdir(workspace) followed by a filepath.Walk(".",...). In most cases, this works fine, but if you run in parallel, different threads start changing the current directory and mess up things like creating files or removing files or walking trees.

In general, os.Chdir() is not a friendly thing to do in libraries, so it is good to remove it.

Both iso9660 and squashfs did this, so fixed in both places.

Thanks to @mchuang3 for the excellent issue in #244, with a simple recreation.

@deitch deitch force-pushed the enable-parallel-iso9660-walk branch from b089d41 to d73fc2b Compare August 2, 2024 14:11
@deitch deitch force-pushed the enable-parallel-iso9660-walk branch from d73fc2b to e408c55 Compare August 2, 2024 14:14
@deitch deitch merged commit 5fa33cd into master Aug 2, 2024
20 checks passed
@deitch deitch deleted the enable-parallel-iso9660-walk branch August 2, 2024 14:16
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.

Random errors with parallel ISO file creation
1 participant