-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
undefined method `rank' for nil:NilClass #124
Comments
I have been having this issue too when uploading a lot of files at once. The files lead to creation of ranked models. |
I think it's a concurrency issue. If you'd like to look at some locking solutions I'd be happy to help get those merged. Perhaps take a look at the |
related #148 (comment) |
I feel like this one was fixed but perhaps I didn't close these issues and PR's? From memory the fix was to check for the existence before attempting to call methods on the object. Or are you still experiencing this issue? |
@brendon I actually don't know if we're still experiencing it because we're running my But, I don't think the missing object was ever handled in this codebase. I'm up for collaborating on some PRs if you are, but at this point, it's really about deciding on handling it since we never really figured out how the object came to be nil. |
Definitely keen to help fix it if we can figure out the cause. There was a situation with rebalancing where I did add a check for |
I'm just going to close my issues and hope for the best |
Thanks @bf4. Always happy to help on this in the future. Key will be having a clear failing test :) |
To be fair, 1) I wrote a failing test and provided a number of possible ways to address it; I just never reproduced the bug on demand. 2) I suggested some other improvements which were also not considered (like always call super in an inherited method) |
My apologies for missing your other commit. I think I noticed that it failed to test out green so I was originally thinking you'd fix that before I took a look. I've done a review of that with some comments. Regarding the failing test, am I right in that you're forcing a fail by calling a method that wouldn't normally be called on a sparse list? Key will be figuring out why this code calls
At the end of the day I'm maintaining this library on a voluntary basis and don't have the time to narrow this one down further, but I'm always happy to assist you where I can. |
Totally feel that. Fellow (burned out) maintainer here |
Ignore.., missed this (breaking to me) change #167 (comment) FWIW, got an error again on I had been running off of my I'm not sure what information would be helpful were I to fork the gem again to protect against this issue. I see #117 is still open
gem-related trace
the specific query I see was upon PATCH id 40061 /*controller_with_namespace:V1::JobProductionPlanSegmentsController,action:update*/
UPDATE "job_production_plan_segments"
SET "sequence" = $1
WHERE "job_production_plan_segments"."id" IN (
SELECT "job_production_plan_segments"."id"
FROM "job_production_plan_segments"
WHERE "job_production_plan_segments"."job_production_plan_id" = $2
AND "job_production_plan_segments"."id" != $3
ORDER BY "job_production_plan_segments"."sequence" ASC
) with binds
full trace
|
Sorry, just confirming, I can ignore the previous message? :) |
Thumbsup
…On Sun, Jan 17, 2021, 2:34 PM Brendon Muir ***@***.***> wrote:
Sorry, just confirming, I can ignore the previous message? :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABC4QWK7B6DKDXVZYBCEK3S2NCVNANCNFSM4EIELA7Q>
.
|
Sometimes in production (on heroku, rails 5.0.3) I get this error:
undefined method `rank' for nil:NilClass
Here is the stack trace:
What can I do ? It might be a concurency issue, because it only happen when loading a lot of items concurently.
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: