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

Improve the scan comparison logic #6168

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

Vincent-lau
Copy link
Contributor

For the scan retry, previously we were comparing the entire vdi data structure from the database using the (<>) operator. This is a bit wasteful and not very stable. Instead let us just compare the vdi refs, since the race here comes from VDI.db_{introduce,forget}, which would only add/remove vdis from the db, but not change its actual data structure.

Also add a bit more logging when retrying, since this should not happen very often.

For the scan retry, previously we were comparing the entire vdi data
structure from the database using the (<>) operator. This is a bit
wasteful and not very stable. Instead let us just compare the vdi refs,
since the race here comes from `VDI.db_{introduce,forget}`, which would
only add/remove vdis from the db, but not change its actual data
structure.

Also add a bit more logging when retrying, since this should not happen
very often.

Signed-off-by: Vincent Liu <[email protected]>
@Vincent-lau Vincent-lau force-pushed the private/shul2/scan-cas branch from 8f7804f to 3e70a6d Compare December 10, 2024 14:40
@Vincent-lau Vincent-lau added this pull request to the merge queue Dec 11, 2024
Merged via the queue into xapi-project:master with commit 4f3f08f Dec 11, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants