-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix: avoid race conditions when removing multiple instance #15495
Conversation
I would like to avoid Lines 78 to 88 in c4d8fdb
That implementation lives in
Those 2 views do appear very similar on a surface-level to the view your patch is concerned with, which I believe is the organization instance group list. So I'd like to see more research on whether that mixin can or can't be reused here, and if not, if the ORM code pattern can be used, and whether a fully general implementation is needed for all attach-detach views as you have, or if a more targeted solution can work. |
had some CI breakage yesterday, rebasing should help |
@AlanCoding @chrismeyersfsu I've changed it to a Mixin & |
to ensure instance group updates are persisted | ||
""" | ||
|
||
def unattach(self, request, *args, **kwargs): |
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.
maybe this needs to be applied to attach as well
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.
I tried it, but it doesn't solve the problem we have with attaching (which is that the order ends up random)
|
…5495) * fix: avoid race conditions when removing multiple instance groups at once * remove unused imports
SUMMARY
Removing multiple instance groups at the same time currently fails. The failure seems to be caused by a race condition, when the UI sends multiple
disassociate
requests.Locking the m2m relationship table during each disassociation resolves the problem (likely because this forces all operations to be sequential in the database).
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION