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.
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
Schedule the check for timed out queue messages once for the region #19585
Schedule the check for timed out queue messages once for the region #19585
Changes from all commits
0bbfe67
ce043b8
c156dcc
cc04c94
6698bf2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
https://twitter.com/nzkoz/status/538892801941848064?lang=en
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.
@carbonin FYI, this commit: e6cbfa8 fixed the "can't modify frozen Hash" error. If I change the above line to remove the
.where
, I can recreate that error for a simulated "exceeding memory worker" because it attempts to update a deleted worker from the cached association. The.where
makes it run the query each time through the method.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.
Oh, interesting. We may still want to make that explicit at some point though ... I wonder if we should do a
miq_workers.all.select
here and amiq_workers.reload
at the start of the method? I guess we're really splitting hairs at that point though ...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 think it's ok here as I'd expect a query like this to not be cached, so, there's no need to reload anything. Relying on an association previously made it very unclear whether we had any expectations on caching. I believe your change is much more explicit. Maybe it's just me though?
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.
My concern is more clearly expressed in https://github.com/ManageIQ/manageiq/pull/19638/files#r357318923
I'm worried that someone removing the
where
for whatever reason wouldn't realize that we were relying on this line reloading the association for reasons other than this particular query.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 like this better than modifying the in-memory association
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 want this merged to test if my other change in this area is needed on master... 😉
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.
💯 Would recommend