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

Fix document save race in parser_aux::load_and_save and creator::create_document #151

Merged
merged 1 commit into from
Nov 22, 2021
Merged

Fix document save race in parser_aux::load_and_save and creator::create_document #151

merged 1 commit into from
Nov 22, 2021

Conversation

jgerrish
Copy link
Contributor

This fixes the race condition identified in issue 137:
#137

There were several changes to fix the existing code and make adding new tests that create files more safe:

Make public helper functions to create and remove documents that can be called from other tests.
Put those helpers and the other unit tests in a tests namespace to make it clear they're for testing.
Use different filenames in different file tests (parser_aux and creator).
In creator, add a mutex around saving and reading files with the same filename.

Let me know if there are any questions or if you have any changes.

Thanks for the great work on this project.

@J-F-Liu J-F-Liu merged commit 53090ad into J-F-Liu:master Nov 22, 2021
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.

2 participants