mc256 / starlight

Fast Container Provisioning on the Edge and over the WAN
Apache License 2.0
44 stars 6 forks source link

Issue with concurrent layer metadata extraction #62

Open mc256 opened 10 months ago

mc256 commented 10 months ago

Describe your question here

There is a race condition when caching two layer concurrently. I was found this bug by concurrently running two

        ext, err := NewExtractor(server, img, true)
        _, err = ext.SaveToC()

in an errgroup.Group

The image we are caching

"starlight/mariadb@sha256:9c0c61b8c8c7e406f48ab2c9fb73181e2f0e07ec327f6a8409f7b64c8fc0a0d6",
"starlight/mariadb:10.11.4"

What kind of hardward you have?

Irrelevant