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][Graph] Write compiled graph to tempfile first #392

Merged
merged 2 commits into from Dec 12, 2023

Conversation

destefy
Copy link
Contributor

@destefy destefy commented Dec 12, 2023

When a process is running save_compiled_graph(path) and writing the CompiledGraph zipfile to the disk, another process may think that the CompiledGraph file can be read since os.path.isfile(path) evaluates to true.

This change writes the file to a temporary file first to avoid this race condition.

@yaoyaoding
Copy link
Member

Thanks @destefy ! It looks good to me.

@yaoyaoding yaoyaoding merged commit f3fa023 into hidet-org:main Dec 12, 2023
2 checks passed
@destefy destefy deleted the fix-save-compiled-graph branch December 14, 2023 21:39
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.

None yet

2 participants