Closed
Description
If the requested item expires between get and set, the file would be unreachable.
https://github.com/paddlesteamer/hdn-drv/blob/b7e487b49f40fe1a2c5839ee85f46a4d313f9c3a/internal/manager/manager.go#L211-L222
Low probability but can happen. Unfortunately go-cache doesn't support atomic operation for this. There is a PR though:
patrickmn/go-cache#96 but it doesn't look completely safe.
So we can implement that ourselves or risk it and use the code in the PR.
Metadata
Assignees
Labels
No labels