-
Notifications
You must be signed in to change notification settings - Fork 246
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
Missing check for NullInt64.Valid in Generic.Count #374
Comments
What version of mysql are you using? Can you reproduce this on demand? I'm curious what the actual query is returning in this case. I don't think it's in generic.Count because that only uses the max revision via |
We're running MySQL 8.0.25. Unfortunately we haven't been able to reliably reproduce this yet.
I traced the usage of that query which is defined as
I don't see another code path for this, so it does appear to be coming from Question is, do we expect this query to ever return null:
If yes, then under what conditions? |
Yeah, I am assuming there is an underlying SQL error here that is being obscured by the error from scan. There should never not be a compact_rev_key entry in the db. |
We're running kine with mysql and see this error intermittently:
The error originates when LimitedServer.Range invokes the method
list
and ultimately invoking Generic.Count.While the error goes away when we restart kine (thus our hunch being this related to a race condition) but it does show up again after a few days. We haven't yet narrowed down on what triggers this.
In the meantime we would be interested in contributing a fix for this. While the fix in itself is simple - check for
NullInt64.Valid
, but we're not sure what the error handling should do. Should it return a custom error? I'd love your thoughts before I work on a PR.Note: The same handling should also be applied to
Generic.CountCurrent
and perhaps also to the other usage ofNullInt64
in sqllog.scan.The text was updated successfully, but these errors were encountered: