Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add defensive copy of objects in InMemBucket (#42)
Add locking and return a copy of the internally stored objects in InMemBucket. This fixes a race condition that can be triggered if the result of `.Objects()` is read while another goroutine modifies the objects (such as uploading a new file). Noticed in grafana/mimir#4021 Signed-off-by: Nick Pillitteri <[email protected]> Co-authored-by: Matej Gera <[email protected]>
- Loading branch information