Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4809 +/- ##
==========================================
+ Coverage 87.54% 87.56% +0.02%
==========================================
Files 258 258
Lines 14152 14162 +10
==========================================
+ Hits 12388 12399 +11
+ Misses 1764 1763 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thread-safe image vault?
This issue has been plaguing me for awhile. See #4613 for a bit of my detective work, but this is what I've found to be happening:
source_images_maintenance_taskand the 15 min timer ofupdate_manifests_all_taskupdate_manifests_all_taskclears the manifest and repopulates it. Concurrently, thesource_images_maintenance_tasktries to update the images in the vault and queries the image host for info on the images. The first task invalidates the data structure causing the second task to reference freed memory.This PR solves the issue by adding a mutex to the
BaseVMImageHostto protect the state of the manifest(s). Reader methods use ashared_lockwhile the writer method,update_manifests(), uses aunique_lock.In order to keep the manipulation of the mutex to a single file, the specific implementations of the subclass image hosts are called via the Template Method pattern.
Fixes #4613
MULTI-2533