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: errors from ResolveOIDFromOID are ignored #84448

Closed
fqazi opened this issue Jul 14, 2022 · 5 comments · Fixed by #85086
Closed

sql: errors from ResolveOIDFromOID are ignored #84448

fqazi opened this issue Jul 14, 2022 · 5 comments · Fixed by #85086
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@fqazi
Copy link
Collaborator

fqazi commented Jul 14, 2022

When we hit transaction retry errors the following code paths can end up swallowing errors, which can lead to other issues:

if err != nil {

dOid, err := res.ResolveOIDFromOID(ctx, t, tree.NewDOid(o))

We ran into this scenario in the randomized schema changer workload where OID casts combined with transaction retry errors could lead to failures.

Jira issue: CRDB-17664
Epic CRDB-14049

@fqazi fqazi added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Jul 14, 2022
@fqazi
Copy link
Collaborator Author

fqazi commented Jul 20, 2022

Similar problem at :

func performIntToOidCast(

@rafiss
Copy link
Collaborator

rafiss commented Jul 25, 2022

@fqazi can you provide a description of what failures or issues this caused?

@ajwerner
Copy link
Contributor

This causes the randomized schema change workload to flake because it will no longer see writes. If you continue using a transaction after an error has been swallowed here, the transaction will be internally restarted but the state machine will not observe that. This leads to complete loss of transactionality. This is the greatest source of flakes in #78478 and #78400. This can cause completely incorrect query results.

@ajwerner
Copy link
Contributor

I don’t think this can be a later thing. I can put up a hack, but I don’t feel great about it. I asked Faizan to assign y’all because I think we should have a tight contract about the errors we accept. I don’t know what that set is, and the commentary on the errors we’re willing to accept are lacking. One approach is to just pass through roachpb.TransactionRetryWithProtoRefreshError, which I think is enough, but I’m not certain.

@rafiss
Copy link
Collaborator

rafiss commented Jul 26, 2022

Thanks for describing the impact. We can pick it up now, but without knowing those details about the impact, we weren't able to make that decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants