oras-project / oras-go

ORAS Go library
https://oras.land
Apache License 2.0
177 stars 94 forks source link

`file.Store` has race conditions on restoring the same named content #730

Closed shizhMSFT closed 6 months ago

shizhMSFT commented 6 months ago

file.Store has race conditions on restoring the same named content, causing testing failures.

Output of failed test https://github.com/oras-project/oras-go/actions/runs/8358181822/job/22878904404:

=== RUN   TestStore_Predecessors
    file_test.go:2400: failed to push test content to src: 10: failed to restore duplicated file: "0c55e531aef3d9c23acecbf74a9ea864e6bdb0ec84b12a9cddfdbb26152d823c.blob": application/vnd.oci.image.index.v1+json: 0c55e531aef3d9c23acecbf74a9ea864e6bdb0ec84b12a9cddfdbb26152d823c.blob: duplicate name