Skip to content
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

sql: retry errors report the wrong key if the table was created in the same txn #14282

Closed
knz opened this issue Mar 20, 2017 · 6 comments
Closed
Assignees
Labels
C-investigation Further steps needed to qualify. C-label will change.
Milestone

Comments

@knz
Copy link
Contributor

knz commented Mar 20, 2017

Found while investigating #14264
The txn there does begin; create database; create table; insert; commit and fails with:

pq: restart transaction: retry txn "sql txn" id=67fdee7f key=/Table/0/0 ...

(note the bogus /Table/0/0 key in the msg)

Whereas if the create database; create table; are performed before begin (prior to the start of the txn) the same retry error is reported as:

pq: restart transaction: retry txn "sql txn" id=0181dd9a key=/Table/51/1/229294915573186561/0 ...

(i.e. with a valid key)

The question is 1) where is the bogus key name coming from 2) is that a problem?

cc @vivekmenezes @dt @danhhz

@knz knz added the C-investigation Further steps needed to qualify. C-label will change. label Mar 20, 2017
@dianasaur323 dianasaur323 added this to the 1.0 milestone Apr 19, 2017
@dianasaur323
Copy link
Contributor

@knz, assigning to you now for reassignment. We should figure out if this will be a problem, and if not, punt the investigation for 1.1. Currently setting as 1.0 for now though so that it doesn't fall through the cracks.

@knz
Copy link
Contributor Author

knz commented Apr 19, 2017

@andreimatei do you know who is best placed to look at this?

@andreimatei andreimatei assigned andreimatei and unassigned knz Apr 19, 2017
@andreimatei andreimatei modified the milestones: Later, 1.0 Apr 19, 2017
@andreimatei
Copy link
Contributor

I think any of us are as good as any other... I've removed the milestone; it doesn't worry me too much :).

@vivekmenezes
Copy link
Contributor

assigning to myself because I'm making major changes in this area.

@bdarnell
Copy link
Contributor

bdarnell commented Jul 5, 2017

  1. where is the bogus key name coming from

Here, which is called from various points in the sql layer related to schema changes. Since #16701, this key is printed as /Table/SystemConfigSpan/Start instead of /Table/0/0.

  1. is that a problem?

I don't think so. @andreimatei and @vivekmenezes is there anything you want to do here or can we close this issue?

@andreimatei
Copy link
Contributor

Yeah, txns that perform schema changes are anchored in the "system config span" so that they trigger gossip.
No problems here AFAICS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-investigation Further steps needed to qualify. C-label will change.
Projects
None yet
Development

No branches or pull requests

5 participants