-
Notifications
You must be signed in to change notification settings - Fork 57
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
Prevent closed block cache usage #250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider using atomic.Bool
for the close state instead of the channel. The channel should work ok, but the bool should be more clear.
I think this looks good. If the (manual) testing is ok I think we can merge. |
Manual testing is ok. Tested using low TTL value in build cache causing closing the diff before it's fully downloaded. |
I'll just do some testing before merging, but otherwise this looks good. |
Prevent the ability to call read/write methods on already closed block cache in orchestrator, as it might cause invalid reads/writes. This might be simulated by closing the build cache right after creation while fetchToCache is still running.