Skip to content
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

v3: Analyze layer content in parallel #741

Merged
merged 1 commit into from
Mar 20, 2019

Conversation

KeyboardNerd
Copy link
Contributor

@KeyboardNerd KeyboardNerd commented Mar 20, 2019

This resolves the performance issue we see.

return err
}

layerMap[layer.Hash] = clairLayer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a lock even though the keys are independent because of races when the runtime is expanding the size of the map.

Even if we added the size to the make,layerMap := make(map[string]*database.Layer, len(req.Layers)), I wouldn't trust this race without a lock.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

@KeyboardNerd KeyboardNerd merged commit 1234a8d into quay:master Mar 20, 2019
@KeyboardNerd KeyboardNerd deleted the parallel_download branch March 20, 2019 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants