-
Notifications
You must be signed in to change notification settings - Fork 14
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
Get rid of 'profiles' in module_defaults association #70
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please add test coverage.
- Isn't there a way how to pass special chars to mongo query?
- Otherwise it looks ok.
|
That's amazing. I almost couldn't believe it, but it's right there in |
Previously, 'profiles' was the key part to get the right modulemd_defaults units to associate and unassociate. However, as the keyword in profiles always include speical character '.'(dot), it leads to mongodb query failure. Since while assmbling the lists of md_defaults_assoc and md_defaults_unassoc, the 'profiles' has already been considered, we don't have to re-query with it, but, because association and unassociation happens at the same time in threads, it could delete the new unit if association happens before unassociation, so, we serialize the modulemd_defaults units unassociation and association.
Previously, 'profiles' was the key part to get the right modulemd_defaults
units to associate and unassociate. However, as the keyword in profiles
always include speical character '.'(dot), it leads to mongodb query failure.
Since while assmbling the lists of md_defaults_assoc and md_defaults_unassoc,
the 'profiles' has already been considered, we don't have to re-query with
it, but, because association and unassociation happens at the same time in
threads, it could delete the new unit if association happens before unassociation,
so, we serialize the modulemd_defaults units unassociation and association.