-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VTTablet query.Result contains inconsistent field/values #4661
Comments
Did you make the schema change via a DDL against the VTGate or against MySQL directly. If you ran it against mysql directly, we had a problem very similar to this. The gist is that you need to invoke |
Yes, we use ghost for schema changes which operates against MySQL directly. I haven't audited the code path that processes MySQL results into protobuf objects yet but given that it's able to populate the result with a column value I suspect we have accurate field data somewhere so I'm hopeful there is a tablet-based fixed. |
Took a super cursory look around and I think the solution here is going to be in |
Patch to handle this case while we move towards a permanent fix upstream. cf. vitessio#4661 vitessio#4669
Ah hadn't seen this issue here before -- we ran into this again and put up #5572 which tackles this by adding an option to simply remove fields from the query cache. |
Patch to handle this case while we move towards a permanent fix upstream. cf. vitessio#4661 vitessio#4669
Patch to handle this case while we move towards a permanent fix upstream. cf. vitessio#4661 vitessio#4669
Patch to handle this case while we move towards a permanent fix upstream. cf. vitessio#4661 vitessio#4669
Patch to handle this case while we move towards a permanent fix upstream. cf. vitessio#4661 vitessio#4669
Patch to handle this case while we move towards a permanent fix upstream. cf. vitessio#4661 vitessio#4669
Patch to handle this case while we move towards a permanent fix upstream. cf. vitessio#4661 vitessio#4669
Patch to handle this case while we move towards a permanent fix upstream. cf. vitessio#4661 vitessio#4669
We are experiencing an issue with
We tried to enable schema tracking as a solution as described here https://vitess.io/docs/design-docs/vreplication/vstream/tracker/ but found that we need more RAM. |
VTTablet responding with stale field information causing a VTgate panic.
When a schema change is made to a tablet to add a new field VTTablet executions of
select *
may returnquerypb.QueryResult
objects that have an outdatedFields
attribute. This contradicts the docs which promise...As returned by Execute, len(fields) is always equal to len(row) (for each row in rows).
The
MakeRowTrusted
implementation relies on that promise that len(fields) === len(row.Lengths) so when we hit the case described above the vtgate panics trying to construct a query result inMakeRowTrusted
. I have a patch which shifts this panic to (I believe) a less common scenario in #4660.The stack trace that led us to this conclusion (I'd love alternate readings) follows in the "Log Fragments" section.
Reproduction Steps
No concrete repro steps, will update as we get a chance to test locally. The summary is:
select *
queriesBinary version
This is on vitess master:
7d3d74790252e0292450b06b2888508835f6a422
Log Fragments
Panic stack trace taken from the vtgate:
The text was updated successfully, but these errors were encountered: