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

Add concurrent write safety #5

Closed

Conversation

loklaan
Copy link

@loklaan loklaan commented Feb 16, 2018

In scenarios where the persistence is being used across concurrent bundlers, writes to a single cache file may overlap to produce invalid JSON.

We can rest easy ignoring write requests from nth participants, because the 1st will do the job for everyone.

Convo started from #3

In scenarios where the persistence is being used across
parallel bundlers, writes to a single cache file may
overlap to produce invalid JSON.
@loklaan
Copy link
Author

loklaan commented Feb 16, 2018

PS. Didn't add tests! Couldn't think of a way to make concurrent bundlers overlap their writes in a deterministic way...

@martinheidegger
Copy link
Owner

@loklaan What do you think of the solution in #6 ?

@loklaan
Copy link
Author

loklaan commented Feb 17, 2018

Solved in #6

@loklaan loklaan closed this Feb 17, 2018
@loklaan loklaan deleted the fix-write-lock-safety branch February 17, 2018 02:44
@loklaan loklaan restored the fix-write-lock-safety branch February 17, 2018 02:45
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