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

Attempt to overwrite without race condition #335

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thatch
Copy link

@thatch thatch commented May 8, 2024

As explained in #332, there was previously a small window of time where the file is deleted before its new contents get written. Because reads don't happen with the lock held, this resulted in an empty-body cache hit when it shouldn't.

Fixes #332

As explained in psf#332, there was previously a small window of time where the
file is deleted before its new contents get written.  Because reads don't
happen with the lock held, this resulted in an empty-body cache hit when it
shouldn't.

Fixes psf#332
@woodruffw woodruffw self-requested a review May 8, 2024 22:09
@woodruffw
Copy link
Member

Thanks @thatch! I'll try and give this a review in the coming days.

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.

Race condition in FileCache that can result in empty body 200 response
2 participants